18 lines
328 B
Go
18 lines
328 B
Go
|
package version
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
version = "undefined"
|
||
|
versionPrerelease = "dev" //nolint:gochecknoglobals // this has to be a variable to set the version during release.
|
||
|
)
|
||
|
|
||
|
func Version() string {
|
||
|
if versionPrerelease != "" {
|
||
|
return fmt.Sprintf("%s-%s", version, versionPrerelease)
|
||
|
}
|
||
|
return version
|
||
|
}
|