On Mon, Mar 25, 2024 at 12:46 PM Nikhilesh Susarla
<nikhilesh1...@gmail.com> wrote:
>
> 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

First, please send Go code as plain text or as a link to the Go
playground.  The background on the text you sent makes it difficult to
read.  Thanks.

To answer your question, vet doesn't check for any possible error
condition.  As described at
https://cs.opensource.google/go/go/+/refs/tags/go1.22.1:src/cmd/vet/README,
vet checks for mistakes that are, among other things, common.   I'm
not sure the mistake you describe is common.

Ian

-- 
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/CAOyqgcVjFsXnVjoTv_fyB7SYmwPrFhCg8su4hU-NGw5kS2YhFQ%40mail.gmail.com.

Reply via email to