1
0
mirror of https://github.com/docker/cli.git synced 2026-01-28 04:20:55 +03:00

Add interfacer linter

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-05-03 17:58:52 -04:00
parent d9fde418c0
commit 37ccc00d0e
39 changed files with 103 additions and 91 deletions

View File

@@ -1,19 +1,19 @@
package system
import (
"github.com/spf13/cobra"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
// NewSystemCommand returns a cobra command for `system` subcommands
// nolint: interfacer
func NewSystemCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{
Use: "system",
Short: "Manage Docker",
Args: cli.NoArgs,
RunE: dockerCli.ShowHelp,
RunE: command.ShowHelp(dockerCli.Err()),
}
cmd.AddCommand(
NewEventsCommand(dockerCli),

View File

@@ -18,7 +18,7 @@ type pruneOptions struct {
}
// NewPruneCommand creates a new cobra.Command for `docker prune`
func NewPruneCommand(dockerCli *command.DockerCli) *cobra.Command {
func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
opts := pruneOptions{filter: opts.NewFilterOpt()}
cmd := &cobra.Command{
@@ -51,7 +51,7 @@ Are you sure you want to continue?`
allImageDesc = `- all images without at least one container associated to them`
)
func runPrune(dockerCli *command.DockerCli, options pruneOptions) error {
func runPrune(dockerCli command.Cli, options pruneOptions) error {
var message string
if options.all {
@@ -66,7 +66,7 @@ func runPrune(dockerCli *command.DockerCli, options pruneOptions) error {
var spaceReclaimed uint64
for _, pruneFn := range []func(dockerCli *command.DockerCli, filter opts.FilterOpt) (uint64, string, error){
for _, pruneFn := range []func(dockerCli command.Cli, filter opts.FilterOpt) (uint64, string, error){
prune.RunContainerPrune,
prune.RunVolumePrune,
prune.RunNetworkPrune,