cli/command/node: fakeClient: remove name for unused arg (revive)

cli/command/node/client_test.go:23:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) {
                                              ^
    cli/command/node/client_test.go:30:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) {
                                    ^
    cli/command/node/client_test.go:37:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error {
                                      ^
    cli/command/node/client_test.go:44:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error {
                                      ^
    cli/command/node/client_test.go:51:29: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) Info(ctx context.Context) (types.Info, error) {
                                ^
    cli/command/node/client_test.go:58:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) {
                                              ^
    cli/command/node/client_test.go:65:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) {
                                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-03-30 16:32:16 +02:00
parent 92d9e3bf69
commit 625988c3aa
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 7 additions and 7 deletions

View File

@ -20,49 +20,49 @@ type fakeClient struct {
serviceInspectFunc func(ctx context.Context, serviceID string, opts types.ServiceInspectOptions) (swarm.Service, []byte, error) serviceInspectFunc func(ctx context.Context, serviceID string, opts types.ServiceInspectOptions) (swarm.Service, []byte, error)
} }
func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) { func (cli *fakeClient) NodeInspectWithRaw(context.Context, string) (swarm.Node, []byte, error) {
if cli.nodeInspectFunc != nil { if cli.nodeInspectFunc != nil {
return cli.nodeInspectFunc() return cli.nodeInspectFunc()
} }
return swarm.Node{}, []byte{}, nil return swarm.Node{}, []byte{}, nil
} }
func (cli *fakeClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) { func (cli *fakeClient) NodeList(context.Context, types.NodeListOptions) ([]swarm.Node, error) {
if cli.nodeListFunc != nil { if cli.nodeListFunc != nil {
return cli.nodeListFunc() return cli.nodeListFunc()
} }
return []swarm.Node{}, nil return []swarm.Node{}, nil
} }
func (cli *fakeClient) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { func (cli *fakeClient) NodeRemove(context.Context, string, types.NodeRemoveOptions) error {
if cli.nodeRemoveFunc != nil { if cli.nodeRemoveFunc != nil {
return cli.nodeRemoveFunc() return cli.nodeRemoveFunc()
} }
return nil return nil
} }
func (cli *fakeClient) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { func (cli *fakeClient) NodeUpdate(_ context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error {
if cli.nodeUpdateFunc != nil { if cli.nodeUpdateFunc != nil {
return cli.nodeUpdateFunc(nodeID, version, node) return cli.nodeUpdateFunc(nodeID, version, node)
} }
return nil return nil
} }
func (cli *fakeClient) Info(ctx context.Context) (types.Info, error) { func (cli *fakeClient) Info(context.Context) (types.Info, error) {
if cli.infoFunc != nil { if cli.infoFunc != nil {
return cli.infoFunc() return cli.infoFunc()
} }
return types.Info{}, nil return types.Info{}, nil
} }
func (cli *fakeClient) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { func (cli *fakeClient) TaskInspectWithRaw(_ context.Context, taskID string) (swarm.Task, []byte, error) {
if cli.taskInspectFunc != nil { if cli.taskInspectFunc != nil {
return cli.taskInspectFunc(taskID) return cli.taskInspectFunc(taskID)
} }
return swarm.Task{}, []byte{}, nil return swarm.Task{}, []byte{}, nil
} }
func (cli *fakeClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) { func (cli *fakeClient) TaskList(_ context.Context, options types.TaskListOptions) ([]swarm.Task, error) {
if cli.taskListFunc != nil { if cli.taskListFunc != nil {
return cli.taskListFunc(options) return cli.taskListFunc(options)
} }