Torjus Håkestad
708147abc3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
34 lines
576 B
Go
34 lines
576 B
Go
package dogtamer
|
|
|
|
import "fmt"
|
|
|
|
const Version string = "v0.1.11"
|
|
|
|
var Build string
|
|
|
|
func GetVersion() string {
|
|
if Build == "" {
|
|
return fmt.Sprintf("Dogtamer Version %s", Version)
|
|
} else {
|
|
return fmt.Sprintf("Dogtamer Version %s (%s)", Version, Build)
|
|
}
|
|
}
|
|
|
|
func GetShortVersion() string {
|
|
var s string
|
|
if Build == "" {
|
|
s = Version
|
|
} else {
|
|
s = fmt.Sprintf("%s-%s", Version, Build)
|
|
}
|
|
return s
|
|
}
|
|
|
|
func GetHeaderVersion() string {
|
|
if Build == "" {
|
|
return fmt.Sprintf("Dogtamer/%s", Version)
|
|
} else {
|
|
return fmt.Sprintf("Dogtamer/%s-%s", Version, Build)
|
|
}
|
|
}
|