update project path

This commit is contained in:
zhangwenjian committed 2020-03-18 23:09:37 +08:00
1 parent 26acdbd0d1
commit e027e6a259
76 files changed
+2562 -106

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
package config
import "github.com/spf13/viper"
type Application struct {
IsInit bool
ReadTimeout int
WriterTimeout int
Host string
Port string
Name string
JwtSecret string
LogPath string
Env string
EnvMsg string
}
func InitApplication(cfg *viper.Viper) *Application {
return &Application{
IsInit: cfg.GetBool("isInit"),
ReadTimeout: cfg.GetInt("readTimeout"),
WriterTimeout: cfg.GetInt("writerTimeout"),
Host: cfg.GetString("host"),
Port: cfg.GetString("port"),
Name: cfg.GetString("name"),
JwtSecret: cfg.GetString("jwtSecret"),
LogPath: cfg.GetString("logPath"),
Env: cfg.GetString("env"),
EnvMsg: cfg.GetString("envMsg"),
}
}
var ApplicationConfig = new(Application)