From e2f28fac47140b2768142fc3b785be3f55730244 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 17 Feb 2025 14:16:42 +0100 Subject: [PATCH] cli/command/registry: fix "unused-receiver" linting cli/command/registry/login_test.go:36:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive) func (c *fakeClient) Info(context.Context) (system.Info, error) { ^ cli/command/registry/login_test.go:40:7: unused-receiver: method receiver 'c' is not referenced in method's body, consider removing or renaming it as _ (revive) func (c *fakeClient) RegistryLogin(_ context.Context, auth registrytypes.AuthConfig) (registrytypes.AuthenticateOKBody, error) { ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/registry/login_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/registry/login_test.go b/cli/command/registry/login_test.go index dc07f7413e..75bd6a3164 100644 --- a/cli/command/registry/login_test.go +++ b/cli/command/registry/login_test.go @@ -33,11 +33,11 @@ type fakeClient struct { client.Client } -func (c *fakeClient) Info(context.Context) (system.Info, error) { +func (*fakeClient) Info(context.Context) (system.Info, error) { return system.Info{}, nil } -func (c *fakeClient) RegistryLogin(_ context.Context, auth registrytypes.AuthConfig) (registrytypes.AuthenticateOKBody, error) { +func (*fakeClient) RegistryLogin(_ context.Context, auth registrytypes.AuthConfig) (registrytypes.AuthenticateOKBody, error) { if auth.Password == expiredPassword { return registrytypes.AuthenticateOKBody{}, errors.New("Invalid Username or Password") }