we had the order of require.Equal() arguments mixed up. it should be
(expected, actual) not the other way around
updated with
find . -name "*_test.go" -exec gofmt -r "require.Equal(a, b) -> require.Equal(b, a)" -w '{}' \+
* Exclude paths based on new exclude pattern option
* Add test for excluded paths
* Add exclude pattern option to docs
* Set exclude regexp only if given argument is set
* Update scanner/scanner.go
---------
Co-authored-by: Senan Kelly <senan@senan.xyz>
and never use db.Where() with a struct
gorm was seeing a query like
db.Where(Album{Left: left, Right: right})
but if the `left` variable was empty, gorm couldn't differentiate it with an empty field in the struct
so it generated SQL that we weren't expected
like
SELECT * FROM albums WHERE right=?
instead of
SELECT * FROM albums WHERE left=? AND right=?
fixes#230