gomonop/pkg/version/version.go
Emmanuel BENOîT 2fa0e37900
All checks were successful
Run tests and linters / test (push) Successful in 43s
Run tests and linters / build (push) Successful in 41s
Run tests and linters / lint (push) Successful in 1m22s
refactor: reorganize project in order to include automation (#1)
Reviewed-on: #1
Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net>
Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net>
2024-07-19 22:01:34 +02:00

27 lines
421 B
Go

package version // import nocternity.net/gomonop/pkg/version
import "fmt"
var (
version = ""
commit = "unknown"
status = ""
target = "unknown/unknown"
)
func Version() string {
var schar, ver string
if status == "dirty" {
schar = "*"
} else {
schar = ""
}
if version == "" {
ver = "development version"
} else {
ver = version
}
return fmt.Sprintf("%s (%s%s) %s", ver, commit, schar, target)
}