Skip to content

Instantly share code, notes, and snippets.

@tlindsay
Created February 29, 2024 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlindsay/0579cb631c459c561180605af966748d to your computer and use it in GitHub Desktop.
Save tlindsay/0579cb631c459c561180605af966748d to your computer and use it in GitHub Desktop.
nilness with build-tags via golangci-lint
linters-settings:
govet:
disable-all: true
enable:
- nilness
//go:build my_tag
package bar
import "os"
func DoTheThing() {
var foo []byte = nil
if foo != nil {
os.Exit(1)
}
os.Exit(0)
}
package main
import "fmt"
func main() {
fmt.Println("yo")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment