Skip to content

Commit b577efb

Browse files
tollcccaihao
and
caihao
authored
feat: Support cache key separator. (#39) (#42)
* feat: Support cache key separator. (#39) * feat: Support cache key separator. (#39) --------- Co-authored-by: caihao <[email protected]>
1 parent 75d8e62 commit b577efb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cacheopt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ func WithEventHandler(eventHandler func(event *Event)) Option {
217217
}
218218
}
219219

220-
func WithSeparatorDisable(separatorDisable bool) Option {
220+
func WithSeparatorDisabled(separatorDisabled bool) Option {
221221
return func(o *Options) {
222-
o.separatorDisabled = separatorDisable
222+
o.separatorDisabled = separatorDisabled
223223
}
224224
}
225225

cacheopt_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ func TestCacheOptions(t *testing.T) {
116116
})
117117

118118
t.Run("with disable default separator", func(t *testing.T) {
119-
o := newOptions(WithSeparatorDisable(true))
119+
o := newOptions(WithSeparatorDisabled(true))
120120
assert.Equal(t, "", o.separator)
121121
})
122122

123123
t.Run("with disable customized separator", func(t *testing.T) {
124-
o := newOptions(WithSeparatorDisable(true), WithSeparator(":"))
124+
o := newOptions(WithSeparatorDisabled(true), WithSeparator(":"))
125125
assert.Equal(t, "", o.separator)
126126
})
127127
}

0 commit comments

Comments
 (0)