capture errors in scanner main

This commit is contained in:
sentriz
2019-05-24 15:36:09 +01:00
parent a91ef24139
commit 4b66a84985
3 changed files with 7 additions and 6 deletions

View File

@@ -25,9 +25,7 @@ func TestFirstExisting(t *testing.T) {
"default"},
}
for _, tc := range cases {
tc := tc // capture range variable?
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
actu := firstExisting(tc.or, tc.values...)
if actu != tc.exp {
t.Errorf("expected %q, got %q", tc.exp, actu)