Skip to content

Commit

Permalink
improve readability follows go-staticcheck (#1227)
Browse files Browse the repository at this point in the history
sign in AUTHORS
  • Loading branch information
zihengCat committed Jun 30, 2021
1 parent 417641a commit 21f789c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -101,6 +101,7 @@ Xiuming Chen <cc at cxm.cc>
Xuehong Chan <chanxuehong at gmail.com>
Zhenye Xie <xiezhenye at gmail.com>
Zhixin Wen <john.wenzhixin at gmail.com>
Ziheng Lyu <zihenglv at gmail.com>

# Organizations

Expand Down
1 change: 0 additions & 1 deletion dsn.go
Expand Up @@ -426,7 +426,6 @@ func parseDSNParams(cfg *Config, params string) (err error) {
// Collation
case "collation":
cfg.Collation = value
break

case "columnsWithAlias":
var isBool bool
Expand Down
2 changes: 1 addition & 1 deletion statement_test.go
Expand Up @@ -36,7 +36,7 @@ func TestConvertDerivedByteSlice(t *testing.T) {
t.Fatal("Byte slice not convertible", err)
}

if bytes.Compare(output.([]byte), []byte("value")) != 0 {
if !bytes.Equal(output.([]byte), []byte("value")) {
t.Fatalf("Byte slice not converted, got %#v %T", output, output)
}
}
Expand Down
2 changes: 1 addition & 1 deletion utils.go
Expand Up @@ -199,7 +199,7 @@ func parseByteYear(b []byte) (int, error) {
return 0, err
}
year += v * n
n = n / 10
n /= 10
}
return year, nil
}
Expand Down

0 comments on commit 21f789c

Please sign in to comment.