Skip to content

Commit

Permalink
Extend multi get filler allowed types (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quang Tùng authored Jul 4, 2023
1 parent 820f6d7 commit 2ca4294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions item/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var ErrExceededRejectRetryLimit = errors.New("item: exceeded lease rejected retr
// ErrInvalidLeaseGetStatus ...
var ErrInvalidLeaseGetStatus = errors.New("item: invalid lease get response status")

type multiGetState[T Value, K Key] struct {
type multiGetState[T any, K comparable] struct {
keys []K
result map[K]T
err error
Expand All @@ -132,7 +132,7 @@ func WithMultiGetEnableDeleteOnNotFound(enable bool) MultiGetFillerOption {
// NewMultiGetFiller ...
//
//revive:disable-next-line:cognitive-complexity
func NewMultiGetFiller[T Value, K Key](
func NewMultiGetFiller[T any, K comparable](
multiGetFunc func(ctx context.Context, keys []K) ([]T, error),
getKey func(v T) K,
options ...MultiGetFillerOption,
Expand Down

0 comments on commit 2ca4294

Please sign in to comment.