File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,14 @@ import (
2121)
2222
2323func main () {
24+ var confPath string
25+ flag .StringVar (& confPath , "config" , "app.ini" , "Specify the configuration file" )
26+ flag .Parse ()
27+
28+ settings .Init (confPath )
29+
30+ gin .SetMode (settings .ServerSettings .RunMode )
31+
2432 r , err := service .GetRuntimeInfo ()
2533
2634 if err != nil {
@@ -33,21 +41,13 @@ func main() {
3341 Fetcher : & fetcher.File {Path : r .ExPath },
3442 TerminateTimeout : 0 ,
3543 })
36-
3744}
3845
3946func prog (state overseer.State ) {
4047 // Hack: fix wrong Content Type of .js file on some OS platforms
4148 // See https://github.com/golang/go/issues/32350
4249 _ = mime .AddExtensionType (".js" , "text/javascript; charset=utf-8" )
4350
44- var confPath string
45- flag .StringVar (& confPath , "config" , "app.ini" , "Specify the configuration file" )
46- flag .Parse ()
47-
48- gin .SetMode (settings .ServerSettings .RunMode )
49-
50- settings .Init (confPath )
5151 log .Printf ("Nginx config dir path: %s" , nginx .GetConfPath ())
5252 if "" != settings .ServerSettings .JwtSecret {
5353 model .Init ()
You can’t perform that action at this time.
0 commit comments