octopush/cmd/server/server.go
Kasper Juul Hermansen 0cb923a3a5 feature/add-actions (#9)
Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: kjuulh/kraken#9
2022-09-14 23:40:58 +02:00

30 lines
479 B
Go

package main
import (
"os"
"git.front.kjuulh.io/kjuulh/kraken/cmd/server/commands"
"git.front.kjuulh.io/kjuulh/kraken/internal/logger"
"go.uber.org/zap"
)
func main() {
logger, err := logger.New()
if err != nil {
panic(err)
}
_ = logger.Sync()
zap.ReplaceGlobals(logger)
Execute(logger)
}
func Execute(logger *zap.Logger) {
err := commands.CreateServerCmd(logger).Execute()
if err != nil {
logger.Error("execution failed", zap.Error(err))
os.Exit(1)
}
}