S1021: should merge variable declaration with assignment on next line (gosimple)

This commit is contained in:
Arran Ubels 2023-02-15 15:50:42 +11:00 committed by GitHub
parent 14cb70eacb
commit 2fb4c46691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,8 +10,7 @@ import (
func TestOne(t *testing.T) {
time.Local = time.UTC
var ts time.Time
ts = MustParse("2020-07-20+08:00")
var ts time.Time = MustParse("2020-07-20+08:00")
assert.Equal(t, "2020-07-19 16:00:00 +0000 UTC", fmt.Sprintf("%v", ts.In(time.UTC)))
}