MCPcopy Create free account
hub / github.com/cppla/moto / main

Function main

run.go:13–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 "os/signal"
12 "syscall"
13
14 "go.uber.org/zap"
15)
16
17var (
18 version = "dev"
19 commit = "unknown"
20 buildDate = "unknown"
21)
22
23func main() {
24 if err := run(); err != nil {
25 fmt.Fprintf(os.Stderr, "moto: %v\n", err)
26 os.Exit(1)
27 }
28}
29
30func run() error {
31 conf := flag.String("config", "", "配置文件路径")
32 checkConfig := flag.Bool("check-config", false, "只校验配置,不启动监听")
33 showVersion := flag.Bool("version", false, "显示版本信息")
34 flag.Parse()
35 if *showVersion {
36 fmt.Printf("moto %s (commit %s, built %s)\n", version, commit, buildDate)
37 return nil
38 }
39

Callers

nothing calls this directly

Calls 2

ReloadFunction · 0.92
ListenFunction · 0.92

Tested by

no test coverage detected