projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Giant blob of minor changes
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
coc-go-data
/
tools
/
pkg
/
mod
/
honnef.co
/
go
/
tools@v0.0.1-2020.1.5
/
staticcheck
/
testdata
/
src
/
CheckAddressIsNil
/
CheckAddressIsNil.go
1
package pkg
2
3
func fn(x int, y *int) {
4
_ = &x == nil // want `the address of a variable cannot be nil`
5
_ = &y != nil // want `the address of a variable cannot be nil`
6
7
if &x != nil { // want `the address of a variable cannot be nil`
8
println("obviously.")
9
}
10
11
if y == nil {
12
}
13
}