diff options
Diffstat (limited to 'cmd/server')
| -rw-r--r-- | cmd/server/main.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go index 8ee5674..db4a479 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -26,13 +26,10 @@ import ( "os" "os/signal" "path/filepath" + "strconv" "syscall" "time" - // "github.com/grafana/pyroscope-go" - // _ "github.com/grafana/pyroscope-go/godeltaprof/http/pprof" - // _ "net/http/pprof" - "github.com/kyren223/eko/embeds" "github.com/kyren223/eko/internal/server" "github.com/kyren223/eko/internal/server/api" @@ -55,7 +52,14 @@ func main() { if len(os.Args) > 1 && os.Args[1] == "-v" { fmt.Println("version:", embeds.Version) fmt.Println("commit:", embeds.Commit) - fmt.Println("build date:", embeds.BuildDate) + buildDate := embeds.BuildDate + if buildDate != "unknown" { + t, err := strconv.ParseInt(buildDate, 10, 64) + if err == nil { + buildDate = time.Unix(t, 0).Format("2006-01-02") + } + } + fmt.Println("build date:", buildDate) return } |
