Skip to content

Commit f8c7edc

Browse files
deps: updates to go 1.25 and latest linters and deps (#480)
Signed-off-by: Adrian Cole <[email protected]>
1 parent 4fba227 commit f8c7edc

File tree

10 files changed

+37
-39
lines changed

10 files changed

+37
-39
lines changed

Tools.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
# * This does not integrate as cleanly as `go tool`, and only works with make
66
# * This does not provide for a go.sum which would lock the versions of tools.
77

8-
golangci_lint := github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.2.1
9-
gofumpt := mvdan.cc/gofumpt@v0.8.0
8+
golangci_lint := github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
9+
gofumpt := mvdan.cc/gofumpt@v0.9.1
1010
gosimports := github.com/rinchsan/gosimports/cmd/[email protected]
1111
# sync this with netlify.toml!
1212
hugo := github.com/gohugoio/[email protected]
13-
nwa := github.com/B1NARY-GR0UP/[email protected].4
14-
nfpm := github.com/goreleaser/nfpm/v2/cmd/[email protected].0
13+
nwa := github.com/B1NARY-GR0UP/[email protected].5
14+
nfpm := github.com/goreleaser/nfpm/v2/cmd/[email protected].1

e2e/func-e_use_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,5 @@ func getVersionsRange(stdout, minor string) (first, latest string) {
162162
}
163163
}
164164
}
165-
return
165+
return first, latest
166166
}

e2e/func-e_versions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ func countLines(stdout string) (count int) {
6363
for s.Scan() {
6464
count++
6565
}
66-
return
66+
return count
6767
}

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/tetratelabs/func-e
22

3-
go 1.24
3+
go 1.25
44

55
require (
6-
github.com/shirou/gopsutil/v4 v4.25.6
7-
github.com/stretchr/testify v1.10.0
8-
github.com/ulikunitz/xz v0.5.14
6+
github.com/shirou/gopsutil/v4 v4.25.8
7+
github.com/stretchr/testify v1.11.1
8+
github.com/ulikunitz/xz v0.5.15
99
github.com/urfave/cli/v2 v2.27.7
1010
gopkg.in/yaml.v3 v3.0.1
1111
)
@@ -18,13 +18,13 @@ require (
1818
github.com/kr/pretty v0.3.1 // indirect
1919
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
2020
github.com/pmezard/go-difflib v1.0.0 // indirect
21-
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
21+
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
2222
github.com/rogpeppe/go-internal v1.14.1 // indirect
2323
github.com/russross/blackfriday/v2 v2.1.0 // indirect
24-
github.com/tklauser/go-sysconf v0.3.12 // indirect
25-
github.com/tklauser/numcpus v0.6.1 // indirect
24+
github.com/tklauser/go-sysconf v0.3.15 // indirect
25+
github.com/tklauser/numcpus v0.10.0 // indirect
2626
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
2727
github.com/yusufpapurcu/wmi v1.2.4 // indirect
28-
golang.org/x/sys v0.33.0 // indirect
28+
golang.org/x/sys v0.35.0 // indirect
2929
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
3030
)

go.sum

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQ
2222
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
2323
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2424
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
25-
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig=
26-
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
25+
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
26+
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
2727
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
2828
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
2929
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
3030
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
3131
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
32-
github.com/shirou/gopsutil/v4 v4.25.6 h1:kLysI2JsKorfaFPcYmcJqbzROzsBWEOAtw6A7dIfqXs=
33-
github.com/shirou/gopsutil/v4 v4.25.6/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c=
34-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
35-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
36-
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
37-
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
38-
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
39-
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
40-
github.com/ulikunitz/xz v0.5.14 h1:uv/0Bq533iFdnMHZdRBTOlaNMdb1+ZxXIlHDZHIHcvg=
41-
github.com/ulikunitz/xz v0.5.14/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
32+
github.com/shirou/gopsutil/v4 v4.25.8 h1:NnAsw9lN7587WHxjJA9ryDnqhJpFH6A+wagYWTOH970=
33+
github.com/shirou/gopsutil/v4 v4.25.8/go.mod h1:q9QdMmfAOVIw7a+eF86P7ISEU6ka+NLgkUxlopV4RwI=
34+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
35+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
36+
github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4=
37+
github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4=
38+
github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso=
39+
github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ=
40+
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
41+
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
4242
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
4343
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
4444
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
@@ -47,10 +47,8 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
4747
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
4848
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
4949
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
50-
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
51-
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
52-
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
53-
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
50+
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
51+
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
5452
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5553
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
5654
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

internal/cmd/app_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func newApp(o *globals.GlobalOpts) (c *cli.App, stdout, stderr *bytes.Buffer) {
199199
c.Writer = stdout
200200
c.ErrWriter = stderr
201201
o.Out = stdout
202-
return
202+
return c, stdout, stderr
203203
}
204204

205205
func runTestCommand(t *testing.T, o *globals.GlobalOpts, args []string) error {

internal/cmd/use.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $ func-e use %s`, currentVersionWorkingDirFile, currentVersionHomeDirFile, versi
4141
if v, err = version.NewVersion("[version] argument", c.Args().First()); err != nil {
4242
err = NewValidationError(err.Error())
4343
}
44-
return
44+
return err
4545
},
4646
Action: func(c *cli.Context) (err error) {
4747
// The argument could be a MinorVersion (ex. 1.19) or a PatchVersion (ex. 1.19.3)

internal/cmd/versions_cmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,5 @@ func setupTestVersions(t *testing.T) (o *globals.GlobalOpts) {
169169
oneTwoTwo := filepath.Join(o.HomeDir, "versions", "1.2.2")
170170
require.NoError(t, os.MkdirAll(oneTwoTwo, 0o700))
171171
morerequire.RequireSetMtime(t, oneTwoTwo, "2021-01-31")
172-
return
172+
return o
173173
}

internal/envoy/version.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func WriteCurrentVersion(v version.Version, homeDir string) error {
4040
func CurrentVersion(homeDir string) (v version.Version, source string, err error) {
4141
s, source, err := getCurrentVersion(homeDir)
4242
v, err = verifyVersion(s, source, err)
43-
return
43+
return v, source, err
4444
}
4545

4646
func verifyVersion(v, source string, err error) (version.Version, error) {
@@ -57,23 +57,23 @@ func getCurrentVersion(homeDir string) (v, source string, err error) {
5757
if ev, ok := os.LookupEnv("ENVOY_VERSION"); ok {
5858
v = ev
5959
source = currentVersionVar
60-
return
60+
return v, source, err
6161
}
6262

6363
// Priority 2: $PWD/.envoy-version
6464
data, err := os.ReadFile(".envoy-version")
6565
if err == nil {
6666
v = strings.TrimSpace(string(data))
6767
source = CurrentVersionWorkingDirFile
68-
return
68+
return v, source, err
6969
} else if !os.IsNotExist(err) {
7070
return "", CurrentVersionWorkingDirFile, err
7171
}
7272

7373
// Priority 3: $FUNC_E_HOME/version
7474
source = CurrentVersionHomeDirFile
7575
v, err = getHomeVersion(homeDir)
76-
return
76+
return v, source, err
7777
}
7878

7979
func getHomeVersion(homeDir string) (v string, err error) {
@@ -83,7 +83,7 @@ func getHomeVersion(homeDir string) (v string, err error) {
8383
} else if os.IsNotExist(err) {
8484
err = nil // ok on file-not-found
8585
}
86-
return
86+
return v, err
8787
}
8888

8989
// VersionUsageList is the priority order of Envoy version sources.

internal/tar/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (d *digester) Read(p []byte) (n int, err error) {
3535
if n > 0 { // per docs on hash.Hash, an error is impossible on Write
3636
d.h.Write(p[:n])
3737
}
38-
return
38+
return n, err
3939
}
4040

4141
// UntarAndVerify is like Untar, except it errors if the stream has a different signature than the given SHA-256.

0 commit comments

Comments
 (0)