Formatted the code

This commit is contained in:
Pradyumna Kaushik 2016-11-15 15:11:00 -05:00 committed by Renan DelValle
parent b7394b8762
commit cd644bbf69

View file

@ -17,7 +17,7 @@ type Task struct {
CMD string `json:"cmd"` CMD string `json:"cmd"`
Instances *int `json:"inst"` Instances *int `json:"inst"`
Host string `json:"host"` Host string `json:"host"`
TaskID string `json:"taskID"` TaskID string `json:"taskID"`
} }
func TasksFromJSON(uri string) ([]Task, error) { func TasksFromJSON(uri string) ([]Task, error) {
@ -42,10 +42,10 @@ func (tsk *Task) UpdateHost(new_host string) bool {
// Validation // Validation
is_correct_host := false is_correct_host := false
for _, existing_host := range constants.Hosts { for _, existing_host := range constants.Hosts {
if new_host == existing_host { if new_host == existing_host {
is_correct_host = true is_correct_host = true
} }
} }
if !is_correct_host { if !is_correct_host {
return false return false
} else { } else {