mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-17 21:37:35 +00:00
30 lines
374 B
Go
30 lines
374 B
Go
|
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
|
||
|
}
|