fixed naming convensions to be camel cased. Reformatted the code.

This commit is contained in:
Pradyumna Kaushik 2016-11-28 17:18:33 -05:00 committed by Renan DelValle
parent 55ea017a9a
commit 50d1d79051
6 changed files with 147 additions and 147 deletions

View file

@ -38,18 +38,18 @@ func TasksFromJSON(uri string) ([]Task, error) {
}
// Update the host on which the task needs to be scheduled.
func (tsk *Task) UpdateHost(new_host string) bool {
func (tsk *Task) UpdateHost(newHost string) bool {
// Validation
is_correct_host := false
for _, existing_host := range constants.Hosts {
if new_host == existing_host {
is_correct_host = true
isCorrectHost := false
for _, existingHost := range constants.Hosts {
if newHost == existingHost {
isCorrectHost = true
}
}
if !is_correct_host {
if !isCorrectHost {
return false
} else {
tsk.Host = new_host
tsk.Host = newHost
return true
}
}