MCPcopy Index your code
hub / github.com/apache/answer / runApp

Function runApp

cmd/main.go:75–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73}
74
75func runApp() {
76 c, err := conf.ReadConfig(path.GetConfigFilePath())
77 if err != nil {
78 panic(err)
79 }
80 app, cleanup, err := initApplication(
81 c.Debug, c.Server, c.Data.Database, c.Data.Cache, c.I18n, c.Swaggerui, c.ServiceConfig, c.UI, log.GetLogger())
82 if err != nil {
83 panic(err)
84 }
85 constant.Version = Version
86 constant.Revision = Revision
87 constant.GoVersion = GoVersion
88 schema.AppStartTime = time.Now()
89 fmt.Println("answer Version:", constant.Version, " Revision:", constant.Revision)
90
91 defer cleanup()
92 if err := app.Run(context.Background()); err != nil {
93 panic(err)
94 }
95}
96
97func newApplication(serverConf *conf.Server, server *gin.Engine, manager *cron.ScheduledTaskManager) *pacman.Application {
98 manager.Run()

Callers 1

command.goFile · 0.85

Calls 4

ReadConfigFunction · 0.92
GetConfigFilePathFunction · 0.92
RunMethod · 0.80
initApplicationFunction · 0.70

Tested by

no test coverage detected