Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# * This does not integrate as cleanly as `go tool`, and only works with make
# * This does not provide for a go.sum which would lock the versions of tools.

golangci_lint := github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.2.1
gofumpt := mvdan.cc/gofumpt@v0.8.0
golangci_lint := github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
gofumpt := mvdan.cc/gofumpt@v0.9.1
gosimports := github.com/rinchsan/gosimports/cmd/gosimports@v0.3.8
# sync this with netlify.toml!
hugo := github.com/gohugoio/hugo@v0.148.1
nwa := github.com/B1NARY-GR0UP/nwa@v0.7.4
nfpm := github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.43.0
nwa := github.com/B1NARY-GR0UP/nwa@v0.7.5
nfpm := github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.43.1
2 changes: 1 addition & 1 deletion e2e/func-e_use_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,5 @@ func getVersionsRange(stdout, minor string) (first, latest string) {
}
}
}
return
return first, latest
}
2 changes: 1 addition & 1 deletion e2e/func-e_versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ func countLines(stdout string) (count int) {
for s.Scan() {
count++
}
return
return count
}
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/tetratelabs/func-e

go 1.24
go 1.25

require (
github.com/shirou/gopsutil/v4 v4.25.6
github.com/stretchr/testify v1.10.0
github.com/ulikunitz/xz v0.5.14
github.com/shirou/gopsutil/v4 v4.25.8
github.com/stretchr/testify v1.11.1
github.com/ulikunitz/xz v0.5.15
github.com/urfave/cli/v2 v2.27.7
gopkg.in/yaml.v3 v3.0.1
)
Expand All @@ -18,13 +18,13 @@ require (
github.com/kr/pretty v0.3.1 // indirect
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tklauser/go-sysconf v0.3.15 // indirect
github.com/tklauser/numcpus v0.10.0 // indirect
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/sys v0.35.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
30 changes: 14 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQ
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig=
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shirou/gopsutil/v4 v4.25.6 h1:kLysI2JsKorfaFPcYmcJqbzROzsBWEOAtw6A7dIfqXs=
github.com/shirou/gopsutil/v4 v4.25.6/go.mod h1:PfybzyydfZcN+JMMjkF6Zb8Mq1A/VcogFFg7hj50W9c=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
github.com/ulikunitz/xz v0.5.14 h1:uv/0Bq533iFdnMHZdRBTOlaNMdb1+ZxXIlHDZHIHcvg=
github.com/ulikunitz/xz v0.5.14/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/shirou/gopsutil/v4 v4.25.8 h1:NnAsw9lN7587WHxjJA9ryDnqhJpFH6A+wagYWTOH970=
github.com/shirou/gopsutil/v4 v4.25.8/go.mod h1:q9QdMmfAOVIw7a+eF86P7ISEU6ka+NLgkUxlopV4RwI=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4=
github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4=
github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso=
github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ=
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
Expand All @@ -47,10 +47,8 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func newApp(o *globals.GlobalOpts) (c *cli.App, stdout, stderr *bytes.Buffer) {
c.Writer = stdout
c.ErrWriter = stderr
o.Out = stdout
return
return c, stdout, stderr
}

func runTestCommand(t *testing.T, o *globals.GlobalOpts, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $ func-e use %s`, currentVersionWorkingDirFile, currentVersionHomeDirFile, versi
if v, err = version.NewVersion("[version] argument", c.Args().First()); err != nil {
err = NewValidationError(err.Error())
}
return
return err
},
Action: func(c *cli.Context) (err error) {
// The argument could be a MinorVersion (ex. 1.19) or a PatchVersion (ex. 1.19.3)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/versions_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ func setupTestVersions(t *testing.T) (o *globals.GlobalOpts) {
oneTwoTwo := filepath.Join(o.HomeDir, "versions", "1.2.2")
require.NoError(t, os.MkdirAll(oneTwoTwo, 0o700))
morerequire.RequireSetMtime(t, oneTwoTwo, "2021-01-31")
return
return o
}
10 changes: 5 additions & 5 deletions internal/envoy/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func WriteCurrentVersion(v version.Version, homeDir string) error {
func CurrentVersion(homeDir string) (v version.Version, source string, err error) {
s, source, err := getCurrentVersion(homeDir)
v, err = verifyVersion(s, source, err)
return
return v, source, err
}

func verifyVersion(v, source string, err error) (version.Version, error) {
Expand All @@ -57,23 +57,23 @@ func getCurrentVersion(homeDir string) (v, source string, err error) {
if ev, ok := os.LookupEnv("ENVOY_VERSION"); ok {
v = ev
source = currentVersionVar
return
return v, source, err
}

// Priority 2: $PWD/.envoy-version
data, err := os.ReadFile(".envoy-version")
if err == nil {
v = strings.TrimSpace(string(data))
source = CurrentVersionWorkingDirFile
return
return v, source, err
} else if !os.IsNotExist(err) {
return "", CurrentVersionWorkingDirFile, err
}

// Priority 3: $FUNC_E_HOME/version
source = CurrentVersionHomeDirFile
v, err = getHomeVersion(homeDir)
return
return v, source, err
}

func getHomeVersion(homeDir string) (v string, err error) {
Expand All @@ -83,7 +83,7 @@ func getHomeVersion(homeDir string) (v string, err error) {
} else if os.IsNotExist(err) {
err = nil // ok on file-not-found
}
return
return v, err
}

// VersionUsageList is the priority order of Envoy version sources.
Expand Down
2 changes: 1 addition & 1 deletion internal/tar/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (d *digester) Read(p []byte) (n int, err error) {
if n > 0 { // per docs on hash.Hash, an error is impossible on Write
d.h.Write(p[:n])
}
return
return n, err
}

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