MCPcopy Create free account
hub / github.com/devfeel/dotweb / initAppConfig

Method initAppConfig

dotweb.go:423–442  ·  view source on GitHub ↗

init App Config

()

Source from the content-addressed store, hash-verified

421
422// init App Config
423func (app *DotWeb) initAppConfig() {
424 config := app.Config
425 // log config
426 if config.App.LogPath != "" {
427 app.SetLogPath(config.App.LogPath)
428 }
429 app.SetEnabledLog(config.App.EnabledLog)
430
431 // run mode config
432 if app.Config.App.RunMode != RunMode_Development && app.Config.App.RunMode != RunMode_Production {
433 app.Config.App.RunMode = RunMode_Development
434 }
435
436 app.HttpServer.initConfig(app.Config)
437
438 // detailed request metrics
439 if config.Server.EnabledDetailRequestData {
440 app.StateInfo().EnabledDetailRequestData = config.Server.EnabledDetailRequestData
441 }
442}
443
444// init register config's Middleware
445func (app *DotWeb) initRegisterConfigMiddleware() {

Callers 2

ReSetConfigMethod · 0.95
ListenAndServeMethod · 0.95

Calls 4

SetLogPathMethod · 0.95
SetEnabledLogMethod · 0.95
StateInfoMethod · 0.95
initConfigMethod · 0.80

Tested by

no test coverage detected