diff options
| author | Jeff Carr <[email protected]> | 2024-10-23 01:31:17 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-23 01:31:17 -0500 |
| commit | 3f2cbcb57f818981b1291c0e644b6e3416b7d455 (patch) | |
| tree | 450662a26b2400d2a76bccbed6966c69ffa58a9e /configfiles.go | |
| parent | ca98c0e3c0e40aa2b4215b90d2c04df2ffe0c63a (diff) | |
things to add xml files
Signed-off-by: Jeff Carr <[email protected]>
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 |
