Skip to content

Commit 39d7233

Browse files
authored
Merge pull request kptdev#4181 from droot/update-deps
Update deps
2 parents 5ac277e + 24952da commit 39d7233

Some content is hidden

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

44 files changed

+193
-195
lines changed

.github/workflows/checkLicenses.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- run: |
2929
./scripts/create-licenses.sh
3030
# Upload the licenses list so it's available if needed
31-
- uses: actions/upload-artifact@v3
31+
- uses: actions/upload-artifact@v4
3232
with:
3333
name: Licenses
3434
path: LICENSES.txt

.golangci.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22

33
run:
44
deadline: 5m
5-
skip-dirs:
6-
thirdparty/
75

86
linters:
97
# please, do not use `enable-all`: it's deprecated and will be removed soon.
108
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
119
disable-all: true
1210
enable:
1311
- bodyclose
14-
- deadcode
15-
- depguard
1612
- dogsled
1713
- dupl
1814
- errcheck
@@ -33,19 +29,19 @@ linters:
3329
- misspell
3430
- nakedret
3531
- staticcheck
36-
- structcheck
3732
- stylecheck
3833
- revive
3934
- typecheck
4035
- unconvert
4136
- unparam
4237
- unused
43-
- varcheck
4438
- whitespace
4539

4640
issues:
4741
exclude:
4842
- Using the variable on range scope `tc` in function literal
43+
exclude-dirs:
44+
- thirdparty/
4945

5046
linters-settings:
5147
dupl:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ install-kind:
5959

6060
.PHONY: install-golangci-lint
6161
install-golangci-lint:
62-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
62+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1
6363

6464
.PHONY: install-go-licenses
6565
install-go-licenses:

commands/alpha/alphacmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func GetCommand(ctx context.Context, _, version string) *cobra.Command {
3232
Use: "alpha",
3333
Short: alphadocs.AlphaShort,
3434
Long: alphadocs.AlphaLong,
35-
RunE: func(cmd *cobra.Command, args []string) error {
35+
RunE: func(cmd *cobra.Command, _ []string) error {
3636
h, err := cmd.Flags().GetBool("help")
3737
if err != nil {
3838
return err

commands/alpha/license/command.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func NewCommand(ctx context.Context, _ string) *cobra.Command {
2727
Use: "license",
2828
Short: "[Alpha] " + licensedocs.LicenseShort,
2929
Long: "[Alpha] " + licensedocs.LicenseShort + "\n" + licensedocs.LicenseLong,
30-
RunE: func(cmd *cobra.Command, args []string) error {
30+
RunE: func(cmd *cobra.Command, _ []string) error {
3131
h, err := cmd.Flags().GetBool("help")
3232
if err != nil {
3333
return err

commands/alpha/rollouts/rolloutscmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func NewCommand(ctx context.Context, version string) *cobra.Command {
2929
Use: "rollouts",
3030
Short: "rollouts",
3131
Long: "rollouts",
32-
RunE: func(cmd *cobra.Command, args []string) error {
32+
RunE: func(cmd *cobra.Command, _ []string) error {
3333
h, err := cmd.Flags().GetBool("help")
3434
if err != nil {
3535
return err

commands/fn/doc/cmdfndoc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewRunner(ctx context.Context, parent string) *Runner {
4343
}
4444
r.Command = c
4545
c.Flags().StringVarP(&r.Image, "image", "i", "", "kpt function image name")
46-
_ = r.Command.RegisterFlagCompletionFunc("image", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
46+
_ = r.Command.RegisterFlagCompletionFunc("image", func(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
4747
return cmdutil.SuggestFunctions(cmd), cobra.ShellCompDirectiveDefault
4848
})
4949
cmdutil.FixDocs("kpt", parent, c)

commands/fn/fncmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func GetCommand(ctx context.Context, name string) *cobra.Command {
3232
Short: fndocs.FnShort,
3333
Long: fndocs.FnLong,
3434
Aliases: []string{"functions"},
35-
RunE: func(cmd *cobra.Command, args []string) error {
35+
RunE: func(cmd *cobra.Command, _ []string) error {
3636
h, err := cmd.Flags().GetBool("help")
3737
if err != nil {
3838
return err

commands/fn/render/cmdrender.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func NewRunner(ctx context.Context, parent string) *Runner {
5353

5454
c.Flags().Var(&r.RunnerOptions.ImagePullPolicy, "image-pull-policy",
5555
"pull image before running the container "+r.RunnerOptions.ImagePullPolicy.HelpAllowedValues())
56-
_ = c.RegisterFlagCompletionFunc("image-pull-policy", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
56+
_ = c.RegisterFlagCompletionFunc("image-pull-policy", func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
5757
return r.RunnerOptions.ImagePullPolicy.AllStrings(), cobra.ShellCompDirectiveDefault
5858
})
5959

commands/fn/render/cmdrender_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ func TestCmd_flagAndArgParsing_Symlink(t *testing.T) {
4444
}
4545

4646
// NoOpRunE is a noop function to replace the run function of a command. Useful for testing argument parsing.
47-
var NoOpRunE = func(cmd *cobra.Command, args []string) error { return nil }
47+
var NoOpRunE = func(_ *cobra.Command, _ []string) error { return nil }

commands/live/migrate/migratecmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func NewRunner(
8686
Short: livedocs.MigrateShort,
8787
Long: livedocs.MigrateShort + "\n" + livedocs.MigrateLong,
8888
Example: livedocs.MigrateExamples,
89-
RunE: func(cmd *cobra.Command, args []string) error {
89+
RunE: func(_ *cobra.Command, args []string) error {
9090
if len(args) == 0 {
9191
// default to current working directory
9292
args = append(args, ".")

commands/live/migrate/migratecmd_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func TestKptMigrate_migrateKptfileToRG(t *testing.T) {
168168
migrateRunner := NewRunner(ctx, tf, cmLoader, ioStreams)
169169
migrateRunner.dryRun = tc.dryRun
170170
migrateRunner.rgFile = tc.rgFilename
171-
migrateRunner.cmInvClientFunc = func(factory util.Factory) (inventory.Client, error) {
171+
migrateRunner.cmInvClientFunc = func(_ util.Factory) (inventory.Client, error) {
172172
return inventory.NewFakeClient([]object.ObjMetadata{}), nil
173173
}
174174
err = migrateRunner.migrateKptfileToRG([]string{dir})
@@ -242,7 +242,7 @@ func TestKptMigrate_retrieveConfigMapInv(t *testing.T) {
242242
// Create MigrateRunner and call "retrieveConfigMapInv"
243243
cmLoader := manifestreader.NewManifestLoader(tf)
244244
migrateRunner := NewRunner(ctx, tf, cmLoader, ioStreams)
245-
migrateRunner.cmInvClientFunc = func(factory util.Factory) (inventory.Client, error) {
245+
migrateRunner.cmInvClientFunc = func(_ util.Factory) (inventory.Client, error) {
246246
return inventory.NewFakeClient([]object.ObjMetadata{}), nil
247247
}
248248
actual, err := migrateRunner.retrieveConfigMapInv(strings.NewReader(tc.configMap), []string{"-"})

commands/live/status/cmdstatus_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ foo/deployment.apps/default/foo is InProgress: inProgress
265265
invFactory := inventory.FakeClientFactory(tc.inventory)
266266
loader := NewFakeLoader(ctx, tf, tc.inventory)
267267
runner := NewRunner(ctx, tf, invFactory, loader)
268-
runner.PollerFactoryFunc = func(c cmdutil.Factory) (poller.Poller, error) {
268+
runner.PollerFactoryFunc = func(_ cmdutil.Factory) (poller.Poller, error) {
269269
return &fakePoller{tc.events}, nil
270270
}
271271

commands/pkg/diff/cmddiff_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ func TestCmd_flagAndArgParsing_Symlink(t *testing.T) {
9191
assert.Equal(t, filepath.Join(cwd, "path", "to", "pkg", "dir"), r.Path)
9292
}
9393

94-
var NoOpRunE = func(cmd *cobra.Command, args []string) error { return nil }
94+
var NoOpRunE = func(_ *cobra.Command, _ []string) error { return nil }

commands/pkg/get/cmdget.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func NewRunner(ctx context.Context, parent string) *Runner {
5555
strings.Join(kptfilev1.UpdateStrategiesAsStrings(), ","))
5656
c.Flags().BoolVar(&r.isDeploymentInstance, "for-deployment", false,
5757
"(Experimental) indicates if this package will be deployed to a cluster.")
58-
_ = c.RegisterFlagCompletionFunc("strategy", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
58+
_ = c.RegisterFlagCompletionFunc("strategy", func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
5959
return kptfilev1.UpdateStrategiesAsStrings(), cobra.ShellCompDirectiveDefault
6060
})
6161
return r

commands/pkg/get/cmdget_test.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// revive:disable:unused-parameter
16+
1517
package get_test
1618

1719
import (
@@ -169,7 +171,7 @@ func TestCmd_fail(t *testing.T) {
169171
}
170172

171173
// NoOpRunE is a noop function to replace the run function of a command. Useful for testing argument parsing.
172-
var NoOpRunE = func(cmd *cobra.Command, args []string) error { return nil }
174+
var NoOpRunE = func(_ *cobra.Command, _ []string) error { return nil }
173175

174176
// NoOpFailRunE causes the test to fail if run is called. Useful for validating run isn't called for
175177
// errors.
@@ -205,26 +207,26 @@ func TestCmd_Execute_flagAndArgParsing(t *testing.T) {
205207
validations func(repo, dir string, r *get.Runner, err error)
206208
}{
207209
"must have at least 1 arg": {
208-
argsFunc: func(repo, _ string) []string {
210+
argsFunc: func(_, _ string) []string {
209211
return []string{}
210212
},
211213
runE: failRun,
212-
validations: func(_, _ string, r *get.Runner, err error) {
214+
validations: func(_, _ string, _ *get.Runner, err error) {
213215
assert.EqualError(t, err, "requires at least 1 arg(s), only received 0")
214216
},
215217
},
216218
"must provide unambiguous repo, dir and version": {
217-
argsFunc: func(repo, _ string) []string {
219+
argsFunc: func(_, _ string) []string {
218220
return []string{"foo", "bar", "baz"}
219221
},
220222
runE: failRun,
221-
validations: func(_, _ string, r *get.Runner, err error) {
223+
validations: func(_, _ string, _ *get.Runner, err error) {
222224
assert.Error(t, err)
223225
assert.Contains(t, err.Error(), "ambiguous repo/dir@version specify '.git' in argument")
224226
},
225227
},
226228
"repo arg is split up correctly into ref and repo": {
227-
argsFunc: func(repo, _ string) []string {
229+
argsFunc: func(_, _ string) []string {
228230
return []string{"something://foo.git/@master", "./"}
229231
},
230232
runE: NoOpRunE,

commands/pkg/pkgcmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func GetCommand(ctx context.Context, name string) *cobra.Command {
3232
Short: pkgdocs.PkgShort,
3333
Long: pkgdocs.PkgLong,
3434
Aliases: []string{"package"},
35-
RunE: func(cmd *cobra.Command, args []string) error {
35+
RunE: func(cmd *cobra.Command, _ []string) error {
3636
h, err := cmd.Flags().GetBool("help")
3737
if err != nil {
3838
return err

commands/pkg/update/cmdupdate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewRunner(ctx context.Context, parent string) *Runner {
5454
"the update strategy that will be used when updating the package. This will change "+
5555
"the default strategy for the package -- must be one of: "+
5656
strings.Join(kptfilev1.UpdateStrategiesAsStrings(), ","))
57-
_ = c.RegisterFlagCompletionFunc("strategy", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
57+
_ = c.RegisterFlagCompletionFunc("strategy", func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
5858
return kptfilev1.UpdateStrategiesAsStrings(), cobra.ShellCompDirectiveDefault
5959
})
6060
cmdutil.FixDocs("kpt", parent, c)

commands/pkg/update/cmdupdate_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestCmd_onlyVersionAsInput(t *testing.T) {
278278
}
279279

280280
// NoOpRunE is a noop function to replace the run function of a command. Useful for testing argument parsing.
281-
var NoOpRunE = func(cmd *cobra.Command, args []string) error { return nil }
281+
var NoOpRunE = func(_ *cobra.Command, _ []string) error { return nil }
282282

283283
// NoOpFailRunE causes the test to fail if run is called. Useful for validating run isn't called for
284284
// errors.
@@ -429,7 +429,7 @@ func TestCmd_path(t *testing.T) {
429429
defer testutil.Chdir(t, test.currentWD)()
430430

431431
r := update.NewRunner(fake.CtxWithDefaultPrinter(), "kpt")
432-
r.Command.RunE = func(cmd *cobra.Command, args []string) error {
432+
r.Command.RunE = func(_ *cobra.Command, _ []string) error {
433433
if !assert.Equal(t, test.expectedFullPackagePath, r.Update.Pkg.UniquePath.String()) {
434434
t.FailNow()
435435
}

go.mod

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ require (
2020
github.com/spf13/pflag v1.0.5
2121
github.com/stretchr/testify v1.8.4
2222
github.com/xlab/treeprint v1.2.0
23-
golang.org/x/mod v0.10.0
24-
golang.org/x/text v0.14.0
23+
golang.org/x/mod v0.17.0
24+
golang.org/x/text v0.21.0
2525
gopkg.in/yaml.v3 v3.0.1
2626
gotest.tools v2.2.0+incompatible
2727
k8s.io/api v0.28.4
@@ -107,11 +107,11 @@ require (
107107
github.com/spyzhov/ajson v0.9.0 // indirect
108108
github.com/vbatts/tar-split v0.11.2 // indirect
109109
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
110-
golang.org/x/net v0.17.0 // indirect
110+
golang.org/x/net v0.33.0 // indirect
111111
golang.org/x/oauth2 v0.8.0 // indirect
112-
golang.org/x/sync v0.2.0 // indirect
113-
golang.org/x/sys v0.13.0 // indirect
114-
golang.org/x/term v0.13.0 // indirect
112+
golang.org/x/sync v0.10.0 // indirect
113+
golang.org/x/sys v0.28.0 // indirect
114+
golang.org/x/term v0.27.0 // indirect
115115
golang.org/x/time v0.3.0 // indirect
116116
google.golang.org/appengine v1.6.7 // indirect
117117
google.golang.org/protobuf v1.33.0 // indirect

go.sum

+14-14
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
270270
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
271271
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
272272
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
273-
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
274-
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
273+
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
274+
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
275275
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
276276
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
277277
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -281,8 +281,8 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR
281281
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
282282
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
283283
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
284-
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
285-
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
284+
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
285+
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
286286
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
287287
golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
288288
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
@@ -292,8 +292,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
292292
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
293293
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
294294
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
295-
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
296-
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
295+
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
296+
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
297297
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
298298
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
299299
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -302,16 +302,16 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
302302
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
303303
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
304304
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
305-
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
306-
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
305+
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
306+
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
307307
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
308-
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
309-
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
308+
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
309+
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
310310
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
311311
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
312312
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
313-
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
314-
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
313+
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
314+
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
315315
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
316316
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
317317
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -322,8 +322,8 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn
322322
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
323323
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
324324
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
325-
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
326-
golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
325+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
326+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
327327
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
328328
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
329329
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

internal/alpha/printers/table/printer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func getProgress(resInfo *resourceInfo) (string, string, error) {
212212

213213
color, setColor := printcommon.ColorForStatus(rs.Status)
214214
if setColor {
215-
s = printcommon.SprintfWithColor(color, s)
215+
s = printcommon.SprintfWithColor(color, "%s", s)
216216
}
217217

218218
text = s
@@ -295,7 +295,7 @@ func getConditions(rs *pollingevent.ResourceStatus) []string {
295295
}
296296
}
297297

298-
s := printcommon.SprintfWithColor(color, text)
298+
s := printcommon.SprintfWithColor(color, "%s", text)
299299
conditionStrings = append(conditionStrings, s)
300300
}
301301
return conditionStrings

internal/errors/errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func E(args ...interface{}) error {
192192
case error:
193193
e.Err = a
194194
case string:
195-
e.Err = fmt.Errorf(a)
195+
e.Err = fmt.Errorf("%s", a)
196196
default:
197197
panic(fmt.Errorf("unknown type %T for value %v in call to error.E", a, a))
198198
}

internal/fnruntime/imagepullpolicy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (e *ImagePullPolicy) Set(v string) error {
5353
return nil
5454
}
5555
}
56-
return fmt.Errorf("must must be one of " + strings.Join(e.AllStrings(), ", "))
56+
return fmt.Errorf("must be one of: %s", strings.Join(e.AllStrings(), ", "))
5757
}
5858

5959
func (e *ImagePullPolicy) AllStrings() []string {

0 commit comments

Comments
 (0)