Hello, // main.go package main
import ( "sync" "time" ) func main() { var wg sync.WaitGroup go lolsleep(&wg) wg.Add(1) wg.Wait() } func lolsleep(wg *sync.WaitGroup) { wg.Done() time.Sleep(3 * time.Second) } go vet main.go Why isn't go vet complaining that wg.Add is happening after the usage. Where as the document clearly says increment and then use it as the wg.Done may be called an can run into negative/deadlock Thank you -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/780d7c19-0141-425a-8ba5-ecc471efe97an%40googlegroups.com.