Skip to content

Commit 94f28b3

Browse files
authored
Merge pull request #41 from kunwardeep/update-go
Updated go and dependencies
2 parents c4a0862 + 7da8182 commit 94f28b3

File tree

135 files changed

+26911
-4492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+26911
-4492
lines changed

.golangci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
linters:
2+
disable:
3+
# Remove deprecated linters
4+
- deadcode # deprecated: replaced by 'unused'
5+
- structcheck # deprecated: replaced by 'unused'
6+
- varcheck # deprecated: replaced by 'unused'
7+
- golint # deprecated: replaced by 'revive'
8+
29
enable:
310
# Default linters
4-
- deadcode
511
- errcheck
612
- gosimple
713
- govet
814
- ineffassign
915
- staticcheck
10-
- structcheck
1116
- typecheck
1217
- unused
13-
- varcheck
1418

1519
# Optional ones we want to include
1620
- gochecknoglobals

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export GOSUMDB := off
22
export GOFLAGS := -v -mod=vendor
3-
GOLANGCI_VERSION := v1.32.2
3+
GOLANGCI_VERSION := v1.55.2
44

55
default: build
66

@@ -14,7 +14,7 @@ ensure_deps:
1414
cd tools && go mod vendor
1515

1616
install_devtools:
17-
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin $(GOLANGCI_VERSION)
17+
GOFLAGS= go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_VERSION)
1818

1919
clean:
2020
go clean $(MAIN_PKG)

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/kunwardeep/paralleltest
22

3-
go 1.18
3+
go 1.24
44

5-
require golang.org/x/tools v0.13.0
5+
require golang.org/x/tools v0.31.0
66

77
require (
8-
golang.org/x/mod v0.12.0 // indirect
9-
golang.org/x/sys v0.12.0 // indirect
8+
golang.org/x/mod v0.24.0 // indirect
9+
golang.org/x/sync v0.12.0 // indirect
1010
)

go.sum

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
2-
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
3-
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
4-
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
5-
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6-
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
7-
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
1+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
2+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
3+
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
4+
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
5+
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
6+
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
7+
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
8+
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=

pkg/paralleltest/testdata/src/t/t_test.go

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,57 @@ func TestFunctionWithSetenvRange(t *testing.T) {
217217
})
218218
}
219219
}
220+
221+
// Test cases for paralleltest package edge cases
222+
func TestParalleltestEdgeCases(t *testing.T) {
223+
t.Parallel()
224+
225+
t.Run("edge_cases", func(t *testing.T) {
226+
t.Parallel()
227+
228+
// Test nil test case
229+
t.Run("nil_test", func(t *testing.T) {
230+
t.Parallel()
231+
// Test handling of nil test case
232+
func() {
233+
defer func() {
234+
if r := recover(); r == nil {
235+
t.Error("Expected panic for nil test case")
236+
}
237+
}()
238+
var nilTest *testing.T
239+
nilTest.Parallel()
240+
}()
241+
})
242+
243+
// Test empty test case
244+
t.Run("empty_test", func(t *testing.T) {
245+
t.Parallel()
246+
// Test handling of empty test case
247+
func() {
248+
defer func() {
249+
if r := recover(); r == nil {
250+
t.Error("Expected panic for empty test case")
251+
}
252+
}()
253+
var emptyTest testing.T
254+
emptyTest.Parallel()
255+
}()
256+
})
257+
258+
// Test invalid test case
259+
t.Run("invalid_test", func(t *testing.T) {
260+
t.Parallel()
261+
// Test handling of invalid test case
262+
func() {
263+
defer func() {
264+
if r := recover(); r == nil {
265+
t.Error("Expected panic for invalid test case")
266+
}
267+
}()
268+
var invalidTest interface{}
269+
invalidTest.(*testing.T).Parallel()
270+
}()
271+
})
272+
})
273+
}

vendor/golang.org/x/mod/LICENSE

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/mod/modfile/read.go

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)