fix gitignore

This commit is contained in:
texm
2023-04-25 14:38:14 +08:00
parent c8202a5c82
commit 495d33e450
5 changed files with 133 additions and 1 deletions

33
cmd/shokku/shokku.go Normal file
View File

@@ -0,0 +1,33 @@
package main
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/rs/zerolog/pkgerrors"
"math/rand"
"os"
"time"
)
const (
BootstrapCmd = "bootstrap"
)
func main() {
rand.Seed(time.Now().UnixNano())
zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack
if len(os.Args) <= 1 {
runServer()
return
} else {
switch cmd := os.Args[1]; cmd {
case BootstrapCmd:
bootstrapServer()
default:
log.Fatal().Msgf("invalid command '%s' provided", cmd)
}
}
}