Compare commits
No commits in common. "d4b7e7e9e6040f9d3c6cba0da789a0d60876cebc" and "629ec74be6b0de5c5e25d54a2a0961cc62c833f5" have entirely different histories.
d4b7e7e9e6
...
629ec74be6
|
@ -41,6 +41,10 @@ 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 {
|
||||
|
@ -51,7 +55,7 @@ func New(srvKey string, cfg any) {
|
|||
func NotNil(values ...string) {
|
||||
for _, value := range values {
|
||||
if strings.TrimSpace(value) == "" {
|
||||
log.Fatalln("ERROR:Must config key not nil")
|
||||
log.Fatalln("ERROR:Must config not nil")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue