Reports problems caused by incorrect usage of the
The IDE analyses data flow to determine if variables could have
nil or not
nil values. Based on this, the IDE reports potential issues in code. Consider the following list of situations that might lead to unintended consequences:
Method calls with the
nilreceiver might lead to 'nil pointer dereference'.
nilslice indexing might cause panics.
v == nilmight be meaningless if
vis known to be always
Variables with corresponding errors are not checked on not to be
nil. An error corresponds to a variable when they are defined or assigned together in statements like
v, err := foo().