diff --git a/.github/workflows/components-contrib.yml b/.github/workflows/components-contrib.yml index 694e95c93..3e39d5e95 100644 --- a/.github/workflows/components-contrib.yml +++ b/.github/workflows/components-contrib.yml @@ -21,11 +21,11 @@ jobs: name: Build ${{ matrix.target_os }}_${{ matrix.target_arch }} binaries runs-on: ${{ matrix.os }} env: - GOVER: 1.13.3 + GOVER: 1.13.7 GOOS: ${{ matrix.target_os }} GOARCH: ${{ matrix.target_arch }} GOPROXY: https://proxy.golang.org - GOLANGCI_LINT_VER: v1.21.0 + GOLANGCI_LINT_VER: v1.23.2 strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] diff --git a/.golangci.yml b/.golangci.yml index 7a7a81c20..dc49cc2e9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -224,3 +224,4 @@ linters: - scopelint - unparam - wsl + - gomnd diff --git a/bindings/twilio/sms.go b/bindings/twilio/sms.go index 14ecb6b8e..e40ffbcc6 100644 --- a/bindings/twilio/sms.go +++ b/bindings/twilio/sms.go @@ -3,11 +3,12 @@ package twilio import ( "errors" "fmt" - "github.com/dapr/components-contrib/bindings" "net/http" "net/url" "strings" "time" + + "github.com/dapr/components-contrib/bindings" ) const ( diff --git a/state/cloudstate/cloudstate_crdt.go b/state/cloudstate/cloudstate_crdt.go index 34a6cbdd7..270ea6d03 100644 --- a/state/cloudstate/cloudstate_crdt.go +++ b/state/cloudstate/cloudstate_crdt.go @@ -280,7 +280,7 @@ func (c *CRDT) Discover(ctx context.Context, in *pb.ProxyInfo) (*pb.EntitySpec, } entities := []*pb.Entity{ - &pb.Entity{ + { EntityType: "cloudstate.crdt.Crdt", ServiceName: "cloudstate.KeyValueStore", PersistenceId: "dapr", diff --git a/state/sqlserver/sqlserver.go b/state/sqlserver/sqlserver.go index fbb4a43c8..0123764c1 100644 --- a/state/sqlserver/sqlserver.go +++ b/state/sqlserver/sqlserver.go @@ -430,6 +430,10 @@ func (s *SQLServer) Get(req *state.GetRequest) (*state.GetResponse, error) { return nil, err } + if rows.Err() != nil { + return nil, rows.Err() + } + defer rows.Close() if !rows.Next() { diff --git a/state/sqlserver/sqlserver_integration_test.go b/state/sqlserver/sqlserver_integration_test.go index ce2bb8b2e..096341584 100644 --- a/state/sqlserver/sqlserver_integration_test.go +++ b/state/sqlserver/sqlserver_integration_test.go @@ -174,6 +174,7 @@ func assertDBQuery(t *testing.T, store *SQLServer, query string, assertReader fu rows, err := db.Query(query) assert.Nil(t, err) + assert.Nil(t, rows.Err()) defer rows.Close() assertReader(t, rows)