Skip to content

Commit 5bde9d0

Browse files
committed
Renamed l variable to length to avoid confusion with number 1
1 parent beaed0b commit 5bde9d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/readpref/options.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ func WithMaxStaleness(ms time.Duration) Option {
3434
// overrides all previous calls to either method.
3535
func WithTags(tags ...string) Option {
3636
return func(rp *ReadPref) error {
37-
l := len(tags)
38-
if l < 2 || l % 2 != 0 {
37+
length := len(tags)
38+
if length < 2 || length % 2 != 0 {
3939
return ErrInvalidTagSet
4040
}
4141

42-
tagset := make(tag.Set, 0, l/2)
42+
tagset := make(tag.Set, 0, length/2)
4343

44-
for i := 1; i < l; i+=2 {
44+
for i := 1; i < length; i+=2 {
4545
tagset = append(tagset, tag.Tag{Name: tags[i-1], Value: tags[i]})
4646
}
4747

0 commit comments

Comments
 (0)