Skip to content

Commit

Permalink
fix(assert-checker): remove unused return value
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Jun 7, 2024
1 parent b411d9d commit c0b7cde
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions errcheck/errcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,17 +677,15 @@ func (v *visitor) checkAssignment(lhs, rhs []ast.Expr) (followed bool) {
return
}

func (v *visitor) checkAssertExpr(expr *ast.TypeAssertExpr) bool {
func (v *visitor) checkAssertExpr(expr *ast.TypeAssertExpr) {
if !v.asserts {
return false
return
}
if expr.Type == nil {
// type switch
return false
return
}
v.addErrorAtPosition(expr.Pos(), nil)

return false
}

func isErrorType(t types.Type) bool {
Expand Down

0 comments on commit c0b7cde

Please sign in to comment.