Upgrade go to 1.13.7 and linter to 1.23.2 (#205)

* upgrade go

* Fix all linter errors
This commit is contained in:
Young Bu Park 2020-02-03 14:29:29 -08:00 committed by GitHub
parent 1fba8dd4b0
commit 5a24823c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 4 deletions

View File

@ -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]

View File

@ -224,3 +224,4 @@ linters:
- scopelint
- unparam
- wsl
- gomnd

View File

@ -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 (

View File

@ -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",

View File

@ -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() {

View File

@ -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)