Changed the loop as now we are looping over a map and not a slice.
This commit is contained in:
parent
710447cb0d
commit
f85ed944f4
2 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ func TasksFromJSON(uri string) ([]Task, error) {
|
|||
func (tsk *Task) UpdateHost(newHost string) bool {
|
||||
// Validation
|
||||
isCorrectHost := false
|
||||
for _, existingHost := range constants.Hosts {
|
||||
for existingHost, _ := range constants.Hosts {
|
||||
if newHost == existingHost {
|
||||
isCorrectHost = true
|
||||
}
|
||||
|
|
Reference in a new issue