mirror of
https://github.com/ferdzo/fs.git
synced 2026-04-04 20:36:25 +00:00
21 lines
276 B
Go
21 lines
276 B
Go
package cmd
|
|
|
|
type BuildInfo struct {
|
|
Version string
|
|
Commit string
|
|
Date string
|
|
}
|
|
|
|
func (b BuildInfo) normalized() BuildInfo {
|
|
if b.Version == "" {
|
|
b.Version = "dev"
|
|
}
|
|
if b.Commit == "" {
|
|
b.Commit = "none"
|
|
}
|
|
if b.Date == "" {
|
|
b.Date = "unknown"
|
|
}
|
|
return b
|
|
}
|