Skip to content

Commit

Permalink
Alter error wording for Konnect struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandeep Jadoonanan committed Oct 4, 2017
1 parent 4b3addb commit 2bfa471
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (k *Konnect) CheckHosts(hosts []string) {
// in Konnect.Hosts, then throw an error.
for _, host := range hosts {
if _, ok := k.Hosts[host]; ok != true {
log.Fatalf("undefined host %v", host)
log.Fatalf("Undefined host %v", host)
}
}
}
Expand All @@ -56,14 +56,14 @@ func (k *Konnect) LoadFromFile(filename string) error {
// Read config file.
byteStr, err := ioutil.ReadFile(filename)
if err != nil {
errMsg := fmt.Sprintf("[config] Read config file %v", err)
errMsg := fmt.Sprintf("Config read error %v", err)
return errors.New(errMsg)
}

// Populate a Konnect struct from a config file.
err = yaml.Unmarshal(byteStr, k)
if err != nil {
errMsg := fmt.Sprintf("[config] Parse config file %v", err)
errMsg := fmt.Sprintf("Config parse error %v", err)
return errors.New(errMsg)
}

Expand Down

0 comments on commit 2bfa471

Please sign in to comment.