-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 0.0.12
-
Component/s: Options & Configuration
-
None
The readpref.WithTags function was entirely broken for any length of arguments n*2 where n > 1 or exactly 0 arguments.
0 arguments:
It only checked for length % 2 == 0 which a length of 0 obviously passes but that obviously isn't a legal tag.
Multiple of 2 arguments:
That for-loop was just completely wrong only accidentally being correct for exactly 2 tags.
It essentially made every key into a name and what should have been the next name into a key,
because it didn't skip any index but instead terminated at just half length, which also meant it would not include any actual later tags pairs.