From c69640d8c1f7cbc2eacdd42ecc64583344fe4789 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 30 Mar 2023 16:35:00 +0200 Subject: [PATCH] cli/command/service: fakeClient: remove name for unused arg (revive) cli/command/service/update_test.go:507:41: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (s secretAPIClientMock) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) { ^ cli/command/service/update_test.go:511:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (s secretAPIClientMock) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) { ^ cli/command/service/update_test.go:515:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (s secretAPIClientMock) SecretRemove(ctx context.Context, id string) error { ^ cli/command/service/update_test.go:519:51: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (s secretAPIClientMock) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) { ^ cli/command/service/update_test.go:523:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (s secretAPIClientMock) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/service/update_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/command/service/update_test.go b/cli/command/service/update_test.go index 91ba4ff381..a6e0e10679 100644 --- a/cli/command/service/update_test.go +++ b/cli/command/service/update_test.go @@ -504,23 +504,23 @@ type secretAPIClientMock struct { listResult []swarm.Secret } -func (s secretAPIClientMock) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) { +func (s secretAPIClientMock) SecretList(context.Context, types.SecretListOptions) ([]swarm.Secret, error) { return s.listResult, nil } -func (s secretAPIClientMock) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) { +func (s secretAPIClientMock) SecretCreate(context.Context, swarm.SecretSpec) (types.SecretCreateResponse, error) { return types.SecretCreateResponse{}, nil } -func (s secretAPIClientMock) SecretRemove(ctx context.Context, id string) error { +func (s secretAPIClientMock) SecretRemove(context.Context, string) error { return nil } -func (s secretAPIClientMock) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) { +func (s secretAPIClientMock) SecretInspectWithRaw(context.Context, string) (swarm.Secret, []byte, error) { return swarm.Secret{}, []byte{}, nil } -func (s secretAPIClientMock) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { +func (s secretAPIClientMock) SecretUpdate(context.Context, string, swarm.Version, swarm.SecretSpec) error { return nil }