File tree Expand file tree Collapse file tree 3 files changed +25
-15
lines changed
Expand file tree Collapse file tree 3 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 11name : Verify
22
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ pull_request :
49
510jobs :
611 go-vet-lint-test :
914 - uses : actions/checkout@v3
1015
1116 - name : Set up Go
12- uses : actions/setup-go@v3
17+ uses : actions/setup-go@v5
1318 with :
1419 go-version : stable
1520
@@ -19,23 +24,16 @@ jobs:
1924 - name : Run go vet
2025 run : go vet ./...
2126
22- - name : Install staticcheck
23- run : go install honnef.co/go/tools/cmd/staticcheck@latest
24-
25- - name : Run staticcheck
26- run : staticcheck ./...
27-
28- - name : Install golint
29- run : go install golang.org/x/lint/golint@latest
30-
31- - name : Run golint
32- run : golint ./...
27+ - name : golangci-lint
28+ uses : golangci/golangci-lint-action@v6
29+ with :
30+ version : v1.64
3331
3432 - name : Run tests
3533 run : go test -race -vet=off -json ./... > TestResults.json
3634
3735 - name : Upload Go test results
38- uses : actions/upload-artifact@v3
36+ uses : actions/upload-artifact@v4
3937 with :
4038 name : Go-test-results
4139 path : TestResults.json
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ parse:
164164 return time.Time {}, err
165165 }
166166 break parse
167- case 'T' :
167+ case 'T' , ' ' :
168168 if p != day {
169169 return time.Time {}, newUnexpectedCharacterError (inp [i ])
170170 }
Original file line number Diff line number Diff line change @@ -299,6 +299,18 @@ var cases = []TestCase{
299299 MilliSecond : 0 ,
300300 Zone : 0 ,
301301 },
302+ {
303+ Using : "2017-04-24 09:41:34" ,
304+ Year : 2017 , Month : 4 , Day : 24 ,
305+ Hour : 9 , Minute : 41 , Second : 34 ,
306+ },
307+ {
308+ Using : "2017-04-24 09:41:34.502+00:00" ,
309+ Year : 2017 , Month : 4 , Day : 24 ,
310+ Hour : 9 , Minute : 41 , Second : 34 ,
311+ MilliSecond : 502 ,
312+ Zone : 0 ,
313+ },
302314
303315 // Invalid Parse Test Cases
304316 {
You can’t perform that action at this time.
0 commit comments