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