Skip to content

Improve readability follows go-staticcheck #1227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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