mirror of https://github.com/dirtbags/moth.git
go fmt
This commit is contained in:
parent
5dccc6431d
commit
97da227777
|
@ -118,16 +118,16 @@ func (s *State) SetTeamName(teamId string, teamName string) error {
|
||||||
if f, err := s.fs.Open("teamids.txt"); err != nil {
|
if f, err := s.fs.Open("teamids.txt"); err != nil {
|
||||||
return fmt.Errorf("Team IDs file does not exist")
|
return fmt.Errorf("Team IDs file does not exist")
|
||||||
} else {
|
} else {
|
||||||
ok := false
|
found := false
|
||||||
scanner := bufio.NewScanner(f)
|
scanner := bufio.NewScanner(f)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
if scanner.Text() == teamId {
|
if scanner.Text() == teamId {
|
||||||
ok = true
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.Close()
|
f.Close()
|
||||||
if !ok {
|
if !found {
|
||||||
return fmt.Errorf("Team ID not found in list of valid Team IDs")
|
return fmt.Errorf("Team ID not found in list of valid Team IDs")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue