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).

Signed-off-by: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com>
  • Loading branch information
tri-adam authored and DrDaveD committed Aug 24, 2023
1 parent 1398c80 commit 4639822
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
Expand Up @@ -2,7 +2,7 @@
// Apptainer a Series of LF Projects LLC.
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
// 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 @@ -44,7 +44,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 @@ -67,7 +66,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
Expand Up @@ -2,7 +2,7 @@
// Apptainer a Series of LF Projects LLC.
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
// 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 @@ -72,7 +72,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 @@ -63,7 +63,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 @@ -115,7 +115,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 4639822

Please sign in to comment.