Check that go.mod exists in reading the version (#173)

Add additional tests in github actions
Support working directory for reading the version from go.mod
This commit is contained in:
Sergey Vilgelm
2021-02-23 23:51:00 -06:00
committed by GitHub
parent 51485a4001
commit d9f0e73c04
8 changed files with 744 additions and 15 deletions

26
sample-go-mod/sample.go Normal file
View File

@ -0,0 +1,26 @@
// Package main is used as test input for golangci action.
package main
import (
"crypto/md5"
"encoding/hex"
"errors"
)
// Hash~
func Hash(data string) string {
retError()
retError2()
h := md5.New()
h.Write([]byte(data))
return hex.EncodeToString(h.Sum(nil))
}
func retError() error {
return errors.New("err")
}
func retError2() error {
return errors.New("err2")
}