Skip to content

Commit

Permalink
Remove IsContinueError
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisuke Maki committed Oct 25, 2024
1 parent 6f57d60 commit e17e229
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion jwk/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/ecdsa"
"crypto/ed25519"
"crypto/rsa"
"errors"
"fmt"
"reflect"
"sync"
Expand Down Expand Up @@ -280,7 +281,7 @@ func Export(key Key, dst interface{}) error {
for _, conv := range exporters {
v, err := conv.Export(key, dst)
if err != nil {
if IsContinueError(err) {
if errors.Is(err, ContinueError()) {
continue
}
return fmt.Errorf(`jwk.Export: failed to export jwk.Key to raw format: %w`, err)
Expand Down
5 changes: 0 additions & 5 deletions jwk/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ func (e *continueError) Error() string {
return "continue parsing"
}

// IsContinueError returns true if the given error is a ContinueError.
func IsContinueError(err error) bool {
return errors.Is(err, &continueError{})
}

type importError struct {
error
}
Expand Down
2 changes: 1 addition & 1 deletion jwk/jwk.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func ParseKey(data []byte, options ...ParseOption) (Key, error) {
return key, nil
}

if IsContinueError(err) {
if errors.Is(err, ContinueError()) {
continue
}

Expand Down

0 comments on commit e17e229

Please sign in to comment.