feat : update config

This commit is contained in:
zhangwenjian
2020-07-27 22:34:01 +08:00
parent 2b92b100e3
commit 7e12e55b56
5 changed files with 36 additions and 38 deletions
+4
View File
@@ -5,12 +5,16 @@ import "github.com/spf13/viper"
type Ssl struct {
KeyStr string
Pem string
Enable bool
Domain string
}
func InitSsl(cfg *viper.Viper) *Ssl {
return &Ssl{
KeyStr: cfg.GetString("key"),
Pem: cfg.GetString("pem"),
Enable: cfg.GetBool("enable"),
Domain: cfg.GetString("domain"),
}
}