Skip to content

Commit 38c5047

Browse files
refactor: address Evan's comment
1 parent 2331766 commit 38c5047

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

refresh/equaler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package refresh
22

3-
type Equaler[T any] interface {
3+
type equaler[T any] interface {
44
Equal(T) bool
55
}

refresh/fetcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const (
1515
// When a diff is observed, the interval resets to the minimum. The interval can be made unchanging by setting
1616
// minInterval and maxInterval to the same desired value.
1717

18-
type Fetcher[T Equaler[T]] struct {
18+
type Fetcher[T equaler[T]] struct {
1919
fetchFunc func(context.Context) (T, error)
2020
cache T
2121
minInterval time.Duration
@@ -27,7 +27,7 @@ type Fetcher[T Equaler[T]] struct {
2727
}
2828

2929
// NewFetcher creates a new Fetcher. If minInterval is 0, it will default to 4 seconds.
30-
func NewFetcher[T Equaler[T]](
30+
func NewFetcher[T equaler[T]](
3131
fetchFunc func(context.Context) (T, error),
3232
minInterval time.Duration,
3333
maxInterval time.Duration,

0 commit comments

Comments
 (0)