Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 640 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 640 Bytes

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")