Skip to content

Commit

Permalink
chore: remove unnecessary nolint:errorlint lines
Browse files Browse the repository at this point in the history
As of v1.4.4, go-errorlint exempts `Is` methods from type assertions
(see polyfloyd/go-errorlint#50).
  • Loading branch information
tri-adam committed Aug 21, 2023
1 parent 5b349c4 commit b3b7b9f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions pkg/integrity/metadata.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
// distributed with the sources of this project regarding your rights to use or distribute this
// software.
Expand Down Expand Up @@ -40,7 +40,6 @@ func (e *DescriptorIntegrityError) Error() string {
// Is compares e against target. If target is a DescriptorIntegrityError and matches e or target
// has a zero value ID, true is returned.
func (e *DescriptorIntegrityError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*DescriptorIntegrityError)
if !ok {
return false
Expand All @@ -63,7 +62,6 @@ func (e *ObjectIntegrityError) Error() string {
// Is compares e against target. If target is a ObjectIntegrityError and matches e or target has a
// zero value ID, true is returned.
func (e *ObjectIntegrityError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*ObjectIntegrityError)
if !ok {
return false
Expand Down
3 changes: 1 addition & 2 deletions pkg/integrity/select.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2022, Sylabs Inc. All rights reserved.
// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file
// distributed with the sources of this project regarding your rights to use or distribute this
// software.
Expand Down Expand Up @@ -68,7 +68,6 @@ func (e *SignatureNotFoundError) Error() string {
// Is compares e against target. If target is a SignatureNotFoundError and matches e or target has
// a zero value ID, true is returned.
func (e *SignatureNotFoundError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*SignatureNotFoundError)
if !ok {
return false
Expand Down
1 change: 0 additions & 1 deletion pkg/integrity/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func (e *SignatureNotValidError) Unwrap() error {
// Is compares e against target. If target is a SignatureNotValidError and matches e or target has
// a zero value ID, true is returned.
func (e *SignatureNotValidError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*SignatureNotValidError)
if !ok {
return false
Expand Down
1 change: 0 additions & 1 deletion pkg/sif/descriptor_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func (e *unexpectedDataTypeError) Error() string {
}

func (e *unexpectedDataTypeError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*unexpectedDataTypeError)
if !ok {
return false
Expand Down

0 comments on commit b3b7b9f

Please sign in to comment.