Use pointer receiver more offen
This commit is contained in:
parent
6999b4e728
commit
c7569b5e54
59 changed files with 688 additions and 672 deletions
|
|
@ -20,7 +20,7 @@ func validTeamName(name string) bool {
|
|||
return err == nil && match
|
||||
}
|
||||
|
||||
func treatRename(pathname string, team fic.Team) {
|
||||
func treatRename(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())
|
||||
|
|
@ -38,7 +38,7 @@ func treatRename(pathname string, team fic.Team) {
|
|||
if _, err := team.Update(); err != nil {
|
||||
log.Printf("%s [WRN] Unable to change team name: %s\n", id, err)
|
||||
}
|
||||
genTeamQueue <- &team
|
||||
genTeamQueue <- team
|
||||
if _, err := fic.NewEvent(fmt.Sprintf("Souhaitons bonne chance à l'équipe <strong>%s</strong> qui vient de nous rejoindre !", html.EscapeString(team.Name)), "info"); err != nil {
|
||||
log.Printf("%s [WRN] Unable to create event: %s\n", id, err)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue