mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:07:31 +00:00
feat: improve console caching and provide build info (#3621)
* feat: improve console caching and provide build info * Update info.go
This commit is contained in:
29
cmd/build/info.go
Normal file
29
cmd/build/info.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package build
|
||||
|
||||
import "time"
|
||||
|
||||
var (
|
||||
version = ""
|
||||
commit = ""
|
||||
date = ""
|
||||
dateTime time.Time
|
||||
)
|
||||
|
||||
func Version() string {
|
||||
return version
|
||||
}
|
||||
|
||||
func Commit() string {
|
||||
return commit
|
||||
}
|
||||
|
||||
func Date() time.Time {
|
||||
if !dateTime.IsZero() {
|
||||
return dateTime
|
||||
}
|
||||
dateTime, _ = time.Parse(time.RFC3339, date)
|
||||
if dateTime.IsZero() {
|
||||
dateTime = time.Now()
|
||||
}
|
||||
return dateTime
|
||||
}
|
Reference in New Issue
Block a user