summaryrefslogtreecommitdiff
path: root/coll
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2021-01-02 12:42:36 -0500
committerDave Henderson <dhenderson@gmail.com>2021-01-02 12:49:40 -0500
commit25042240754ae032f53f2225e2f224cbfe51b2b6 (patch)
tree5530b07d4928a483d1d34be3138605f6014b422a /coll
parent09a33cdffa6d0b4e57e12827f7075fb2d6c6a543 (diff)
Moving lint config to config file, fixing some issues
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'coll')
-rw-r--r--coll/coll_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/coll/coll_test.go b/coll/coll_test.go
index ee6f7a2d..72d6b372 100644
--- a/coll/coll_test.go
+++ b/coll/coll_test.go
@@ -331,6 +331,7 @@ func TestLessThan(t *testing.T) {
}
for _, d := range data {
+ d := d
t.Run(fmt.Sprintf(`LessThan("%s")(<%T>%#v,%#v)==%v`, d.key, d.left, d.left, d.right, d.out), func(t *testing.T) {
assert.Equal(t, d.out, lessThan(d.key)(d.left, d.right))
})
@@ -449,6 +450,7 @@ func TestSort(t *testing.T) {
}
for _, d := range data {
+ d := d
t.Run(fmt.Sprintf(`Sort("%s",<%T>)==%#v`, d.key, d.in, d.out), func(t *testing.T) {
out, err := Sort(d.key, d.in)
assert.NoError(t, err)
@@ -556,7 +558,9 @@ func BenchmarkFlatten(b *testing.B) {
},
}
for depth := -1; depth <= 2; depth++ {
+ depth := depth
for _, d := range data {
+ d := d
b.Run(fmt.Sprintf("depth%d %T(%v)", depth, d, d), func(b *testing.B) {
for i := 0; i < b.N; i++ {
Flatten(d, depth)