cli/command/stack: fix "unused-receiver" linting

cli/command/stack/swarm/client_test.go:47:7: unused-receiver: method receiver 'cli' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServerVersion(context.Context) (types.Version, error) {
          ^
    cli/command/stack/swarm/deploy_composefile_test.go:17:7: unused-receiver: method receiver 'n' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (n notFound) NotFound() {}
          ^
    cli/command/stack/client_test.go:47:7: unused-receiver: method receiver 'cli' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServerVersion(context.Context) (types.Version, error) {
          ^
    cli/command/stack/client_test.go:183:7: unused-receiver: method receiver 'cli' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceInspectWithRaw(_ context.Context, serviceID string, _ types.ServiceInspectOptions) (swarm.Service, []byte, error) {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-02-17 14:29:22 +01:00
parent 994e1b7cad
commit 1a4491f8c6
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ type fakeClient struct {
configRemoveFunc func(configID string) error
}
func (cli *fakeClient) ServerVersion(context.Context) (types.Version, error) {
func (*fakeClient) ServerVersion(context.Context) (types.Version, error) {
return types.Version{
Version: "docker-dev",
APIVersion: api.DefaultVersion,
@ -180,7 +180,7 @@ func (cli *fakeClient) ConfigRemove(_ context.Context, configID string) error {
return nil
}
func (cli *fakeClient) ServiceInspectWithRaw(_ context.Context, serviceID string, _ types.ServiceInspectOptions) (swarm.Service, []byte, error) {
func (*fakeClient) ServiceInspectWithRaw(_ context.Context, serviceID string, _ types.ServiceInspectOptions) (swarm.Service, []byte, error) {
return swarm.Service{
ID: serviceID,
Spec: swarm.ServiceSpec{

View File

@ -44,7 +44,7 @@ type fakeClient struct {
configRemoveFunc func(configID string) error
}
func (cli *fakeClient) ServerVersion(context.Context) (types.Version, error) {
func (*fakeClient) ServerVersion(context.Context) (types.Version, error) {
return types.Version{
Version: "docker-dev",
APIVersion: api.DefaultVersion,

View File

@ -14,7 +14,7 @@ type notFound struct {
error
}
func (n notFound) NotFound() {}
func (notFound) NotFound() {}
func TestValidateExternalNetworks(t *testing.T) {
testcases := []struct {