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

@ -18,7 +18,7 @@ type askOpenHint struct {
HintId int64 `json:"id"`
}
func treatOpeningHint(pathname string, team fic.Team) {
func treatOpeningHint(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())
@ -54,7 +54,7 @@ func treatOpeningHint(pathname string, team fic.Team) {
log.Printf("%s [WRN] Unable to create event: %s\n", id, err)
}
genTeamQueue <- &team
genTeamQueue <- team
appendGenQueue(genStruct{Type: GenEvents})
if err = os.Remove(pathname); err != nil {
log.Printf("%s [ERR] %s\n", id, err)