Skip to content

Commit 21f789c

Browse files
authored
improve readability follows go-staticcheck (#1227)
sign in AUTHORS
1 parent 417641a commit 21f789c

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

‎AUTHORS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Xiuming Chen <cc at cxm.cc>
101101
Xuehong Chan <chanxuehong at gmail.com>
102102
Zhenye Xie <xiezhenye at gmail.com>
103103
Zhixin Wen <john.wenzhixin at gmail.com>
104+
Ziheng Lyu <zihenglv at gmail.com>
104105

105106
# Organizations
106107

‎dsn.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ func parseDSNParams(cfg *Config, params string) (err error){
426426
// Collation
427427
case"collation":
428428
cfg.Collation=value
429-
break
430429

431430
case"columnsWithAlias":
432431
varisBoolbool

‎statement_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestConvertDerivedByteSlice(t *testing.T){
3636
t.Fatal("Byte slice not convertible", err)
3737
}
3838

39-
ifbytes.Compare(output.([]byte), []byte("value"))!=0{
39+
if!bytes.Equal(output.([]byte), []byte("value")){
4040
t.Fatalf("Byte slice not converted, got %#v %T", output, output)
4141
}
4242
}

‎utils.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func parseByteYear(b []byte) (int, error){
199199
return0, err
200200
}
201201
year+=v*n
202-
n=n/10
202+
n/=10
203203
}
204204
returnyear, nil
205205
}

0 commit comments

Comments
(0)