mirror of
https://github.com/ferdzo/fs.git
synced 2026-04-05 08:46:24 +00:00
Initial FS CLI
This commit is contained in:
20
cmd/buildinfo.go
Normal file
20
cmd/buildinfo.go
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user