godyn/main.go

29 lines
447 B
Go
Raw Normal View History

2023-10-16 15:52:17 +02:00
package main
import (
"os"
"time"
"velvettear/godyn/client"
"velvettear/godyn/config"
"velvettear/godyn/log"
"velvettear/godyn/server"
)
// version := "0.1"
func main() {
timestamp := time.Now()
config.Initialize()
if config.ServerMode() {
server.Run()
} else {
client.Run()
}
exit(timestamp, 0)
}
func exit(timestamp time.Time, code int) {
log.InfoTimed("godyn finished - exiting...", timestamp.UnixMilli())
os.Exit(code)
}