Use pointer receiver more offen
This commit is contained in:
parent
6999b4e728
commit
c7569b5e54
59 changed files with 688 additions and 672 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue