update error message.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
c655a9bf07
commit
2e7255ccd1
|
@ -27,3 +27,4 @@ gin-bin
|
||||||
key.pem
|
key.pem
|
||||||
config.yaml
|
config.yaml
|
||||||
bin/*
|
bin/*
|
||||||
|
.DS_Store
|
||||||
|
|
|
@ -67,14 +67,15 @@ func LoadConfYaml(confPath string) (ConfYaml, error) {
|
||||||
configFile, err := ioutil.ReadFile(confPath)
|
configFile, err := ioutil.ReadFile(confPath)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Unable to read config file '%s'", confPath)
|
log.Printf("Unable to read config file, path: '%s'", confPath)
|
||||||
|
|
||||||
return config, err
|
return config, err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = yaml.Unmarshal([]byte(configFile), &config)
|
err = yaml.Unmarshal([]byte(configFile), &config)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Unable to read config file '%v'", err)
|
log.Printf("Unable to Unmarshal config file '%s'", confPath)
|
||||||
|
|
||||||
return config, err
|
return config, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue