stillbox/internal/version/version.go

24 lines
423 B
Go
Raw Normal View History

2024-10-18 09:34:20 -04:00
package version
import (
"fmt"
"runtime"
2024-11-03 07:19:03 -05:00
"dynatron.me/x/stillbox/internal/common"
2024-10-18 09:34:20 -04:00
)
var (
2024-11-03 07:19:03 -05:00
Name = common.AppName
2024-10-18 09:34:20 -04:00
Version = "unset"
Built = "unset"
)
func String() string {
2024-11-03 07:19:03 -05:00
return fmt.Sprintf("%s %s\nbuilt %s for %s-%s\n",
Name, Version, Built, runtime.GOOS, runtime.GOARCH)
2024-10-18 09:34:20 -04:00
}
2024-10-21 22:37:44 -04:00
2024-10-22 10:21:11 -04:00
func HttpString(app string) string {
return fmt.Sprintf("stillbox %s/%s (%s/%s)", app, Version, runtime.GOOS, runtime.GOARCH)
2024-10-21 22:37:44 -04:00
}