Code Monkey home page Code Monkey logo

go-utiles's Introduction

go1.14+ Go Reference

go-utiles

Yet, another utility package of Go.

go get github.com/KEINOS/go-utiles

For available functions and example usages, see:


Statuses

Go Report Card codecov CodeQL golangci-lint

License

go-utiles's People

Contributors

keinos avatar

Watchers

 avatar

go-utiles's Issues

false-negative on go-versions.yml (container)

Symptom

The go-version.yml passes the test on unit test failure.

Cause

docker-compose up won't return an error on failure, since the container itself successfully booted.

- name: Run tests on Go 1.14
run: docker-compose --file ./.github/docker-compose.yml up v1_14

Fix

  1. Use --abort-on-container-exit option.
    - docker-compose --file ./.github/docker-compose.yml up v1_14 
    + docker-compose --file ./.github/docker-compose.yml up --abort-on-container-exit v1_14 
  2. Or use the run command. (recommended)
    - docker-compose --file ./.github/docker-compose.yml up v1_14 
    + docker-compose --file ./.github/docker-compose.yml run v1_14 

comments in JA -> EN

This package should be written in English for my practice.

  • // VerifySUM8 は inputWithCheckSum の末尾 2 桁に SUM8 のチェックサムが付いた文
    // 字列が有効な場合に true を返します。

ParseVersion() does not parse "v.1.*" format

  • Code to reproduce
func TestParseVersion(t *testing.T) {
	for _, test := range []struct {
		expect map[string]string
		input  string
	}{
		{
			map[string]string{"major": "1", "minor": "2", "patch": "3", "prerelease": "", "build": "12345"},
			"v.1.2.3+12345",
		},
	} {
		actual, err := util.ParseVersion(test.input)
		require.NoError(t, err)
		require.Equal(t, test.expect, actual, "input: %s", test.input)
	}
}
--- FAIL: TestParseVersion (0.00s)
    /workspaces/go-utiles/util/ParseVersion_test.go:62: 
        	Error Trace:	ParseVersion_test.go:62
        	Error:      	Received unexpected error:
        	            	invalid version string
        	Test:       	TestParseVersion
FAIL
FAIL	github.com/KEINOS/go-utiles/util	0.005s
FAIL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.