Print version on startup, set this via -ldflags "-X main.version=foo"

This commit is contained in:
Bendodroid 2024-01-16 02:20:45 +01:00
parent 2fb2e5f151
commit bbeb0d0e2b
Signed by: bendodroid
GPG key ID: 3EEE19A0F73D5FFC

View file

@ -18,6 +18,7 @@ import (
var (
flagHelp bool
version string
)
func init() {
@ -25,6 +26,8 @@ func init() {
}
func main() {
log.Println("SpaceAPId version", version)
flag.Parse()
if flagHelp {