enable gitea actions

This commit is contained in:
Aleksandr Trushkin
2024-02-02 18:24:00 +03:00
parent 4ceeba1608
commit d18d1d44dd
9 changed files with 124 additions and 44 deletions

36
buildinfo.go Normal file
View File

@ -0,0 +1,36 @@
package eway
import (
"sync"
"time"
)
var (
version string = "v0.0.0"
commit string = "0000000"
buildTimeStr string
buildTime time.Time
parseOnce sync.Once
)
func Version() string {
return version
}
func Commit() string {
return commit
}
func BuildTime() time.Time {
parseOnce.Do(func() {
if buildTimeStr == "" {
return
}
buildTime, _ = time.Parse(buildTimeStr, time.RFC3339)
})
return buildTime
}