config重构

This commit is contained in:
linwenxiang committed 2020-12-08 20:28:26 +08:00
1 parent 0810383afc
commit 5f873914e0
14 files changed
+134 -208

No files matched your search

-11
View File
@@ -1,7 +1,5 @@
package config
import "github.com/spf13/viper"
type Ssl struct {
KeyStr string
Pem string
@@ -9,13 +7,4 @@ type Ssl struct {
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"),
}
}
var SslConfig = new(Ssl)