Linters are specialized static analysis tools that parse Go files and attempt to detect, flag, and report cases where the following occurs:
- The code does not adhere to the standard formatting style guide; for example, it contains extraneous whitespace, is incorrectly indented, or contains comments with spelling typos
- The program contains possible logic bugs; for example, a variable declaration shadowing a previous variable declaration with the same name, calling functions such as fmt.Printf with an incorrect argument count or with arguments whose types do not match the format string, assigning values to variables but not actually using them, not checking errors returned by function ...