Thanks so much Matt, appreciate your wisdom.
On Wednesday, February 3, 2021 at 11:45:50 AM UTC-5 matthew...@nytimes.com
wrote:
> You are correct sir, and unfortunately, go vet doesn't find it either.
> But if you lint your code with golangci-lint (
> https://github.com/golangci/golangci-lint)
You are correct sir, and unfortunately, go vet doesn't find it either.
But if you lint your code with golangci-lint (
https://github.com/golangci/golangci-lint)
the deadcode linter will find it for you.
On Wed, Feb 3, 2021 at 9:35 AM Danny Hart wrote:
> Hello all,
>
> Very new gopher here (also
Hello all,
Very new gopher here (also first time using Groups, please excuse poor
etiquette). I was curious why the following basic program compiles with an
unused var. Is it the case that the compiler only complains about unused
vars in a function body?
package main
import (
"fmt"
)
var (