diff options
Diffstat (limited to 'configfiles.go')
| -rw-r--r-- | configfiles.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/configfiles.go b/configfiles.go index e038f70..df56e83 100644 --- a/configfiles.go +++ b/configfiles.go @@ -12,16 +12,17 @@ import ( ) var ErrorNoFile error = errors.New("missing file") -var ErrorParse error = errors.New("invalid json") +var ErrorParseJSON error = errors.New("invalid json") +var ErrorParseXML error = errors.New("invalid xml") -// something is wrong somewhere and sometimes the +// something is wrong somewhere and sometimes the // protobuf json files get written out with garbage func cfgfile() { err := readConfigFile("virtigo.json") if err == nil { return } - if err == ErrorParse { + if err == ErrorParseJSON { os.Exit(-1) } err = readConfigFile("virtigo.json.last") @@ -47,7 +48,7 @@ func readConfigFile(filename string) error { if err != nil { log.Info("read json failed", err) os.Exit(-1) - return ErrorParse + return ErrorParseJSON } // initialize each hypervisor |
