From 2e7255ccd1f952183c63b0c3bc0c4ab0afdc4196 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 28 Mar 2016 09:12:57 +0800 Subject: [PATCH] update error message. Signed-off-by: Bo-Yi Wu --- .gitignore | 1 + gorush/config.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e6a2667..9022144 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ gin-bin key.pem config.yaml bin/* +.DS_Store diff --git a/gorush/config.go b/gorush/config.go index 01a0113..310e1eb 100644 --- a/gorush/config.go +++ b/gorush/config.go @@ -67,14 +67,15 @@ func LoadConfYaml(confPath string) (ConfYaml, error) { configFile, err := ioutil.ReadFile(confPath) 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 } err = yaml.Unmarshal([]byte(configFile), &config) + if err != nil { - log.Printf("Unable to read config file '%v'", err) + log.Printf("Unable to Unmarshal config file '%s'", confPath) return config, err }