Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Harald Albers <[email protected]>
  • Loading branch information
albers committed Oct 19, 2024
1 parent 8ae6ad6 commit 4f7abb8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/command/system/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func eventTypeNames() []string {
// The list is derived from eventActions.
// Actions that are not suitable for usage in completions are removed.
func validEventNames() []string {
var names []string
names := []string{}
for _, eventAction := range eventActions {
if strings.Contains(string(eventAction), " ") {
continue
Expand Down Expand Up @@ -191,7 +191,7 @@ func imageNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command) []st
if err != nil {
return []string{}
}
var names []string
names := []string{}
for _, img := range list {
names = append(names, img.RepoTags...)
}
Expand All @@ -205,7 +205,7 @@ func networkNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command) []
if err != nil {
return []string{}
}
var names []string
names := []string{}
for _, nw := range list {
names = append(names, nw.Name)
}
Expand All @@ -219,7 +219,7 @@ func nodeNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command) []str
if err != nil {
return []string{}
}
var names []string
names := []string{}
for _, node := range list {
names = append(names, node.Description.Hostname)
}
Expand All @@ -233,7 +233,7 @@ func volumeNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command) []s
if err != nil {
return []string{}
}
var names []string
names := []string{}
for _, v := range list.Volumes {
names = append(names, v.Name)
}
Expand Down

0 comments on commit 4f7abb8

Please sign in to comment.