Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stringintconv and ifaceassert to govet
Add new linters: * stringintconv, enabled by default * ifaceassert is additional linter Move govet tests to a dedicated folder
- Loading branch information
Sergey Vilgelm
committed
Sep 8, 2020
1 parent
140d51b
commit d9df700
Showing
3 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//args: -Egovet | ||
//config: linters-settings.govet.enable=["ifaceassert"] | ||
package govet | ||
|
||
import ( | ||
"io" | ||
) | ||
|
||
func IfaceAssert() { | ||
var v interface { | ||
Read() | ||
} | ||
_ = v.(io.Reader) // ERROR "composites: `os.PathError` composite literal uses unkeyed fields" | ||
} |