25 lines
430 B
Go
25 lines
430 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"game/server/db/cmd"
|
||
|
"github.com/fox/fox/ksync"
|
||
|
"github.com/fox/fox/log"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
GitCommit = "unknown"
|
||
|
GitBranch = "unknown"
|
||
|
BuildDate = "unknown"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
tm, err := time.Parse("20060102150405", BuildDate)
|
||
|
if err == nil {
|
||
|
BuildDate = tm.Format("2006-01-02 15:04:05")
|
||
|
}
|
||
|
ksync.RunSafe(func() {
|
||
|
cmd.Run(GitBranch, GitCommit, BuildDate)
|
||
|
}, func() { log.ErrorF("reset run") })
|
||
|
}
|