Files
calculate_negative_points/internal/config/version.go
Eugene Howe b0957bfa49
Some checks failed
Docker Build and Publish / publish (push) Failing after 1m33s
webapp
2026-02-17 09:47:30 -05:00

35 lines
597 B
Go

package config
import "fmt"
type Version struct {
Release string
Commit string
Date string
}
var (
release = "dev"
commit = ""
date = ""
)
func (v *Version) AppNameAndVersion(details bool) string {
result := fmt.Sprintf("Basin Feature Flag Service %s", v.Release)
if details && v.Commit != "" {
result = fmt.Sprintf("%s\nGit commit: %s", result, v.Commit)
}
if details && v.Date != "" {
result = fmt.Sprintf("%s\nBuilt at: %s", result, v.Date)
}
return result
}
func NewVersion() Version {
return Version{
Release: release,
Commit: commit,
Date: date,
}
}