@@ -3,7 +3,6 @@ package gopush
|
||||
import (
|
||||
"gopkg.in/yaml.v2"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
)
|
||||
|
||||
type ConfYaml struct {
|
||||
@@ -89,16 +88,12 @@ func LoadConfYaml(confPath string) (ConfYaml, error) {
|
||||
configFile, err := ioutil.ReadFile(confPath)
|
||||
|
||||
if err != nil {
|
||||
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 Unmarshal config file '%s'", confPath)
|
||||
|
||||
return config, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user