We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beaed0b commit 5bde9d0Copy full SHA for 5bde9d0
core/readpref/options.go
@@ -34,14 +34,14 @@ func WithMaxStaleness(ms time.Duration) Option {
34
// overrides all previous calls to either method.
35
func WithTags(tags ...string) Option {
36
return func(rp *ReadPref) error {
37
- l := len(tags)
38
- if l < 2 || l % 2 != 0 {
+ length := len(tags)
+ if length < 2 || length % 2 != 0 {
39
return ErrInvalidTagSet
40
}
41
42
- tagset := make(tag.Set, 0, l/2)
+ tagset := make(tag.Set, 0, length/2)
43
44
- for i := 1; i < l; i+=2 {
+ for i := 1; i < length; i+=2 {
45
tagset = append(tagset, tag.Tag{Name: tags[i-1], Value: tags[i]})
46
47
0 commit comments