Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d4b7e7e9e6 | |||
| 98ee26f215 | |||
| 0218dfd02e |
@@ -41,10 +41,6 @@ func New(srvKey string, cfg any) {
|
||||
log.Fatalln("ERROR: Service Not Nil", cfp)
|
||||
}
|
||||
|
||||
if !strings.Contains(string(yamlFile), "Port:") {
|
||||
log.Fatalln("ERROR: Port Not Nil", cfp)
|
||||
}
|
||||
|
||||
// 解析YAML
|
||||
err = yaml.Unmarshal(yamlFile, cfg)
|
||||
if err != nil {
|
||||
@@ -55,7 +51,7 @@ func New(srvKey string, cfg any) {
|
||||
func NotNil(values ...string) {
|
||||
for _, value := range values {
|
||||
if strings.TrimSpace(value) == "" {
|
||||
log.Fatalln("ERROR:Must config not nil")
|
||||
log.Fatalln("ERROR:Must config key not nil")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user