MCPcopy Index your code
hub / github.com/TruthHun/BookStack / main

Function main

main.go:17–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15)
16
17func main() {
18 // https://beego.me/docs/mvc/controller/config.md#app-%E9%85%8D%E7%BD%AE
19 beego.BConfig.MaxMemory = 1 << 26 * 1024 // 设置最大内存,64GB
20 if len(os.Args) >= 3 && os.Args[1] == "service" {
21 if os.Args[2] == "install" {
22 daemon.Install()
23 } else if os.Args[2] == "remove" {
24 daemon.Uninstall()
25 } else if os.Args[2] == "restart" {
26 daemon.Restart()
27 }
28 }
29 commands.RegisterCommand()
30
31 d := daemon.NewDaemon()
32
33 s, err := service.New(d, d.Config())
34
35 if err != nil {
36 fmt.Println("Create service error => ", err)
37 os.Exit(1)
38 }
39 utils.PrintInfo()
40 utils.InitVirtualRoot()
41 s.Run()
42}

Callers

nothing calls this directly

Calls 9

ConfigMethod · 0.95
InstallFunction · 0.92
UninstallFunction · 0.92
RestartFunction · 0.92
RegisterCommandFunction · 0.92
NewDaemonFunction · 0.92
PrintInfoFunction · 0.92
InitVirtualRootFunction · 0.92
RunMethod · 0.80

Tested by

no test coverage detected