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

Function RegisterCommand

commands/command.go:140–152  ·  view source on GitHub ↗

RunCommand 注册orm命令行工具

()

Source from the content-addressed store, hash-verified

138
139// RunCommand 注册orm命令行工具
140func RegisterCommand() {
141
142 if len(os.Args) >= 2 && os.Args[1] == "install" {
143 ResolveCommand(os.Args[2:])
144 Install()
145 } else if len(os.Args) >= 2 && os.Args[1] == "version" {
146 ResolveCommand(os.Args[2:])
147 CheckUpdate()
148 } else if len(os.Args) >= 2 && os.Args[1] == "migrate" {
149 ResolveCommand(os.Args[2:])
150 migrate.RunMigration()
151 }
152}
153
154func RegisterFunction() {
155 beego.AddFuncMap("config", models.GetOptionValue)

Callers 1

mainFunction · 0.92

Calls 4

RunMigrationFunction · 0.92
ResolveCommandFunction · 0.85
CheckUpdateFunction · 0.85
InstallFunction · 0.70

Tested by

no test coverage detected