Use pointer receiver more offen

This commit is contained in:
nemunaire 2021-11-22 15:35:07 +01:00
commit c7569b5e54
59 changed files with 688 additions and 672 deletions

View file

@ -16,7 +16,7 @@ type wantChoices struct {
FlagId int `json:"id"`
}
func treatWantChoices(pathname string, team fic.Team) {
func treatWantChoices(pathname string, team *fic.Team) {
// Generate a unique identifier to follow the request in logs
bid := make([]byte, 5)
binary.LittleEndian.PutUint32(bid, rand.Uint32())
@ -43,7 +43,7 @@ func treatWantChoices(pathname string, team fic.Team) {
} else if err = team.DisplayChoices(flag); err != nil {
log.Printf("%s [ERR] %s\n", id, err)
} else {
genTeamQueue <- &team
genTeamQueue <- team
if err = os.Remove(pathname); err != nil {
log.Printf("%s [ERR] %s\n", id, err)
}