Skip to content

Commit 59c5b3b

Browse files
authored
Merge pull request #40 from github/dependabot/go_modules/golang.org/x/sync-0.19.0
Bump golang.org/x/sync from 0.7.0 to 0.19.0
2 parents 66ebe69 + a8a0783 commit 59c5b3b

9 files changed

Lines changed: 73 additions & 56 deletions

File tree

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-go@v3
1616
with:
17-
go-version: "1.19"
17+
go-version: "1.24"
1818
- name: Vendor modules for later steps.
1919
run: |
2020
go mod vendor
21-
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
21+
- uses: golangci/golangci-lint-action@v9.2.0
2222
with:
23-
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
24-
version: v1.55
23+
# The version of golangci-lint to use (full version with patch number)
24+
version: v2.8.0
2525
args:
2626
-v

.golangci.yml

Lines changed: 56 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,61 @@
22
# The Go Language Working Group is currently working on a finalized version
33
# of this configuration file to share with all Hubbers.
44

5-
linters:
6-
enable:
7-
- depguard
8-
- errcheck
9-
- exportloopref
10-
- gocritic
11-
- gocyclo
12-
- gofmt
13-
- goimports
14-
- gosec
15-
- gosimple
16-
- govet
17-
- ineffassign
18-
- misspell
19-
- nakedret
20-
- prealloc
21-
- revive
22-
- staticcheck
23-
- typecheck
24-
- unconvert
25-
- unused
26-
disable:
27-
- gochecknoglobals # we allow global variables in packages
28-
- gochecknoinits # we allow inits in packages
29-
- goconst # we allow repeated values to go un-const'd
30-
- lll # we allow any line length
31-
- unparam # we allow function calls to name unused parameters
32-
- maligned # clear structs are more important than saving a few bytes.
5+
version: "2"
336

34-
linters-settings:
35-
depguard:
36-
rules:
37-
main:
38-
files:
39-
- "$all"
40-
- "!$test"
41-
deny:
42-
- pkg: io/ioutil
43-
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
7+
linters:
8+
enable:
9+
- copyloopvar
10+
- depguard
11+
- errcheck
12+
- gocritic
13+
- gocyclo
14+
- gosec
15+
- govet
16+
- ineffassign
17+
- misspell
18+
- nakedret
19+
- prealloc
20+
- revive
21+
- staticcheck
22+
- unconvert
23+
- unused
24+
disable:
25+
- gochecknoglobals # we allow global variables in packages
26+
- gochecknoinits # we allow inits in packages
27+
- goconst # we allow repeated values to go un-const'd
28+
- lll # we allow any line length
29+
- unparam # we allow function calls to name unused parameters
30+
settings:
31+
depguard:
32+
rules:
33+
main:
34+
files:
35+
- $all
36+
- '!$test'
37+
deny:
38+
- pkg: io/ioutil
39+
desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil
40+
exclusions:
41+
generated: lax
42+
presets:
43+
- comments
44+
- common-false-positives
45+
- legacy
46+
- std-error-handling
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$
51+
- internal/deprecated$
4452

45-
run:
46-
timeout: 5m
47-
skip-dirs:
48-
- internal/deprecated
53+
formatters:
54+
enable:
55+
- gofmt
56+
- goimports
57+
exclusions:
58+
generated: lax
59+
paths:
60+
- third_party$
61+
- builtin$
62+
- examples$

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module github.com/github/go-pipe
22

3-
go 1.19
3+
go 1.24.0
4+
5+
toolchain go1.24.11
46

57
require (
68
github.com/stretchr/testify v1.11.1
79
go.uber.org/goleak v1.2.1
8-
golang.org/x/sync v0.7.0
10+
golang.org/x/sync v0.19.0
911
)
1012

1113
require (

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
22
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
5+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
56
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
67
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
78
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -10,9 +11,10 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
1011
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
1112
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
1213
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
13-
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
14-
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
14+
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
15+
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
1516
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1617
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
18+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1719
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
1820
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

internal/ptree/ptree_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func TestWalkChildren(t *testing.T) {
7777
require.Equal(t, "ready", string(ready[:]))
7878

7979
var numChildren int
80-
ptree.WalkChildren(cmd.Process.Pid, func(pid int) {
80+
ptree.WalkChildren(cmd.Process.Pid, func(_ int) {
8181
numChildren++
8282
})
8383
assert.Equal(t, depth, numChildren)

pipe/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func (s *commandStage) filterCmdError(err error) error {
201201
// doesn't do anything on Windows, where the `Signaled()`
202202
// method isn't implemented (it is hardcoded to return
203203
// `false`).
204-
ps, ok := eErr.ProcessState.Sys().(syscall.WaitStatus)
204+
ps, ok := eErr.Sys().(syscall.WaitStatus)
205205
if ok && ps.Signaled() &&
206206
(ps.Signal() == syscall.SIGTERM || ps.Signal() == syscall.SIGKILL) {
207207
return ctxErr

pipe/command_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ func TestCopyEnvWithOverride(t *testing.T) {
7676
}
7777

7878
for _, ex := range examples {
79-
ex := ex
8079
t.Run(ex.label, func(t *testing.T) {
8180
assert.ElementsMatch(t, ex.expectedResult,
8281
copyEnvWithOverrides(ex.env, ex.overrides))

pipe/pipeline.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type Env struct {
2828
// and is not reported to the caller.
2929
//
3030
//revive:disable:error-naming
31+
//nolint:staticcheck // ST1012: FinishEarly is the intentional name for this sentinel error
3132
var FinishEarly = errors.New("finish stage early")
3233

3334
//revive:enable:error-naming
@@ -67,7 +68,7 @@ type Pipeline struct {
6768
panicHandler StagePanicHandler
6869
}
6970

70-
var emptyEventHandler = func(e *Event) {}
71+
var emptyEventHandler = func(_ *Event) {}
7172

7273
type nopWriteCloser struct {
7374
io.Writer

pipe/pipeline_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func TestFunction(t *testing.T) {
473473
pipe.Print("hello world"),
474474
pipe.Function(
475475
"farewell",
476-
func(_ context.Context, _ pipe.Env, stdin io.Reader, stdout io.Writer) error {
476+
func(_ context.Context, _ pipe.Env, _ io.Reader, _ io.Writer) error {
477477
panic("this is a panic")
478478
},
479479
),
@@ -886,7 +886,6 @@ func TestErrors(t *testing.T) {
886886
expectedErr: err1,
887887
},
888888
} {
889-
tc := tc
890889
t.Run(tc.name, func(t *testing.T) {
891890
t.Parallel()
892891

0 commit comments

Comments
 (0)