Use pointer receiver more offen

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

View file

@ -96,7 +96,7 @@ func consumer() {
}
// Generate issues.json for a given team
func genTeamIssuesFile(team fic.Team) error {
func genTeamIssuesFile(team *fic.Team) error {
dirPath := path.Join(TeamsDir, fmt.Sprintf("%d", team.Id))
if s, err := os.Stat(dirPath); os.IsNotExist(err) {
@ -237,7 +237,7 @@ func genAll() {
} else {
for _, team := range teams {
myteam := team // team is reused, we need to create a new variable here to store the value
genTeamQueue <- &myteam
genTeamQueue <- myteam
}
}
}