Y
Hacker News
new
|
ask
|
show
|
jobs
by
assbuttbuttass
1264 days ago
Dereferencing isn't the only way to touch a pointer:
func (o *myObject) isNil() bool { return o == nil }
1 comments
Cyph0n
1264 days ago
Right, but if you’re doing a nil check, you obviously won’t be worried about nil deferences.
link