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 {
|
||||
return fmt.Errorf("Team IDs file does not exist")
|
||||
} else {
|
||||
ok := false
|
||||
found := false
|
||||
scanner := bufio.NewScanner(f)
|
||||
for scanner.Scan() {
|
||||
if scanner.Text() == teamId {
|
||||
ok = true
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
f.Close()
|
||||
if !ok {
|
||||
if !found {
|
||||
return fmt.Errorf("Team ID not found in list of valid Team IDs")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue