misc: fix error formatting in multiple files
This commit is contained in:
1 parent
2b729a78f3
commit
556e3525ea
28 files changed
+91
-91
No files matched your search
@@ -39,7 +39,7 @@ func validateAtplCfg(cfg *autoPilotConfig) ([]*autopilot.WeightedHeuristic,
|
||||
a, ok := autopilot.AvailableHeuristics[name]
|
||||
if !ok {
|
||||
// No heuristic matching this config option was found.
|
||||
return nil, fmt.Errorf("Heuristic %v not available. %v",
|
||||
return nil, fmt.Errorf("heuristic %v not available. %v",
|
||||
name, availStr)
|
||||
}
|
||||
|
||||
@@ -58,11 +58,11 @@ func validateAtplCfg(cfg *autoPilotConfig) ([]*autopilot.WeightedHeuristic,
|
||||
|
||||
// Check found heuristics. We must have at least one to operate.
|
||||
if len(heuristics) == 0 {
|
||||
return nil, fmt.Errorf("No active heuristics. %v", availStr)
|
||||
return nil, fmt.Errorf("no active heuristics: %v", availStr)
|
||||
}
|
||||
|
||||
if sum != 1.0 {
|
||||
return nil, fmt.Errorf("Heuristic weights must sum to 1.0")
|
||||
return nil, fmt.Errorf("heuristic weights must sum to 1.0")
|
||||
}
|
||||
return heuristics, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user