ReSetConfig reset config for app only apply when app is running Port can not be modify if EnabledPProf, EnabledPProf flag and PProfPort can not be modify
(config *config.Config)
| 331 | // Port can not be modify |
| 332 | // if EnabledPProf, EnabledPProf flag and PProfPort can not be modify |
| 333 | func (app *DotWeb) ReSetConfig(config *config.Config) { |
| 334 | if !app.isRun { |
| 335 | app.Logger().Debug("DotWeb is not running, ReSetConfig can not be call", LogTarget_HttpServer) |
| 336 | return |
| 337 | } |
| 338 | |
| 339 | config.Server.Port = app.Config.Server.Port |
| 340 | if app.Config.App.EnabledPProf { |
| 341 | config.App.PProfPort = app.Config.App.PProfPort |
| 342 | config.App.EnabledPProf = app.Config.App.EnabledPProf |
| 343 | } |
| 344 | app.Config = config |
| 345 | app.appLog = logger.NewAppLog() |
| 346 | app.initAppConfig() |
| 347 | app.Logger().Debug("DotWeb ReSetConfig is done.", LogTarget_HttpServer) |
| 348 | } |
| 349 | |
| 350 | // StartServer start server with http port |
| 351 | // if config the pprof, will be start pprof server |
no test coverage detected