From a54d356a7b58a544d1c3cf51ffdc9bee4af401fb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 17 Feb 2025 14:15:54 +0100 Subject: [PATCH] cli/command/swarm: fix "unused-receiver" linting cli/command/swarm/opts.go:71:7: unused-receiver: method receiver 'a' is not referenced in method's body, consider removing or renaming it as _ (revive) func (a *NodeAddrOption) Type() string { ^ cli/command/swarm/opts.go:107:7: unused-receiver: method receiver 'm' is not referenced in method's body, consider removing or renaming it as _ (revive) func (m *ExternalCAOption) Type() string { ^ cli/command/swarm/opts.go:132:7: unused-receiver: method receiver 'p' is not referenced in method's body, consider removing or renaming it as _ (revive) func (p *PEMFile) Type() string { ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/swarm/opts.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/command/swarm/opts.go b/cli/command/swarm/opts.go index f8ebc900e8..a29a67147c 100644 --- a/cli/command/swarm/opts.go +++ b/cli/command/swarm/opts.go @@ -68,7 +68,7 @@ func (a *NodeAddrOption) Set(value string) error { } // Type returns the type of this flag -func (a *NodeAddrOption) Type() string { +func (*NodeAddrOption) Type() string { return "node-addr" } @@ -104,7 +104,7 @@ func (m *ExternalCAOption) Set(value string) error { } // Type returns the type of this option. -func (m *ExternalCAOption) Type() string { +func (*ExternalCAOption) Type() string { return "external-ca" } @@ -129,7 +129,7 @@ type PEMFile struct { } // Type returns the type of this option. -func (p *PEMFile) Type() string { +func (*PEMFile) Type() string { return "pem-file" }