mirror of
https://github.com/mgechev/revive.git
synced 2025-07-15 01:04:40 +02:00
Lint cleanup (#679)
This commit is contained in:
@ -13,8 +13,6 @@ import (
|
||||
"github.com/mgechev/revive/lint"
|
||||
)
|
||||
|
||||
const styleGuideBase = "https://golang.org/wiki/CodeReviewComments"
|
||||
|
||||
// isBlank returns whether id is the blank identifier "_".
|
||||
// If id == nil, the answer is false.
|
||||
func isBlank(id *ast.Ident) bool { return id != nil && id.Name == "_" }
|
||||
@ -82,10 +80,10 @@ var zeroLiteral = map[string]bool{
|
||||
"0i": true,
|
||||
}
|
||||
|
||||
func validType(T types.Type) bool {
|
||||
return T != nil &&
|
||||
T != types.Typ[types.Invalid] &&
|
||||
!strings.Contains(T.String(), "invalid type") // good but not foolproof
|
||||
func validType(t types.Type) bool {
|
||||
return t != nil &&
|
||||
t != types.Typ[types.Invalid] &&
|
||||
!strings.Contains(t.String(), "invalid type") // good but not foolproof
|
||||
}
|
||||
|
||||
// isPkgDot checks if the expression is <pkg>.<name>
|
||||
|
Reference in New Issue
Block a user