Skip to content

Commit

Permalink
clarify when jwk.Set.RemoveKey can return error (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
sding3 authored Nov 17, 2023
1 parent ea2c632 commit 52b176a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jwk/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ type Set interface {
// specify, and there is no way of knowing what type they could be.
Set(string, interface{}) error

// RemoveKey removes the specified non-key field from the set.
// Keys may not be removed using this method.
// Remove removes the specified non-key field from the set.
// Keys may not be removed using this method. See RemoveKey for
// removing keys.
Remove(string) error

// Index returns the index where the given key exists, -1 otherwise
Expand All @@ -101,6 +102,8 @@ type Set interface {
LookupKeyID(string) (Key, bool)

// RemoveKey removes the key from the set.
// RemoveKey returns an error when the specified key does not exist
// in set.
RemoveKey(Key) error

// Keys creates an iterator to iterate through all keys in the set.
Expand Down

0 comments on commit 52b176a

Please sign in to comment.