config重构
This commit is contained in:
1 parent
0810383afc
commit
5f873914e0
14 files changed
+134
-208
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user