From 0798959be882eb9b10ddced37e7048bd2d7c77ea Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 30 Sep 2022 19:55:44 -0400 Subject: [PATCH] Add asasalint linter --- .golangci.yml | 1 + model/criteria/operators_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4310e276c..208d91564 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,6 +3,7 @@ run: linters: enable: + - asasalint - bodyclose - depguard - dogsled diff --git a/model/criteria/operators_test.go b/model/criteria/operators_test.go index a5ceb914f..b61ce1b6e 100644 --- a/model/criteria/operators_test.go +++ b/model/criteria/operators_test.go @@ -13,11 +13,11 @@ var _ = Describe("Operators", func() { rangeStart := Time(time.Date(2021, 10, 01, 0, 0, 0, 0, time.Local)) rangeEnd := Time(time.Date(2021, 11, 01, 0, 0, 0, 0, time.Local)) DescribeTable("ToSQL", - func(op Expression, expectedSql string, expectedArgs ...interface{}) { + func(op Expression, expectedSql string, expectedArgs ...any) { sql, args, err := op.ToSql() gomega.Expect(err).ToNot(gomega.HaveOccurred()) gomega.Expect(sql).To(gomega.Equal(expectedSql)) - gomega.Expect(args).To(gomega.ConsistOf(expectedArgs)) + gomega.Expect(args).To(gomega.ConsistOf(expectedArgs...)) }, Entry("is [string]", Is{"title": "Low Rider"}, "media_file.title = ?", "Low Rider"), Entry("is [bool]", Is{"loved": true}, "COALESCE(annotation.starred, false) = ?", true),