Skip to content

Latest commit

 

History

History

XR001

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

XR001

The XR001 analyzer reports usage of GetOkExists() calls, which generally do not work as expected. Usage should be moved to standard Get() and GetOk() calls.

Flagged Code

d.GetOkExists("example")

Passing Code

d.Get("example")

// or

d.GetOk("example")

Ignoring Reports

Singular reports can be ignored by adding the a //lintignore:XR001 Go code comment at the end of the offending line or on the line immediately proceding, e.g.

//lintignore:XR001
d.GetOkExists("example")