-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Considere remover as variáveis globais colocando-as dentro escopo da função main. O pior exemplo disso é o WaitGroup que fica passado entre as goroutines. Um exemplo de como fazer isso seria dessa maneira:
go func() {
wg.Add(1)
doStuff(someArg, wg)
}()
.
.
.
func doStuff(arg interface{}, wg *sync.WaitGroup) {
defer wg.Done()
...
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels