@@ -1186,8 +1186,10 @@ func AutocompletePullOption(_ *cobra.Command, _ []string, _ string) ([]string, c
11861186// AutocompleteRestartOption - Autocomplete restart options for create and run command.
11871187// -> "always", "no", "on-failure", "unless-stopped"
11881188func AutocompleteRestartOption (_ * cobra.Command , _ []string , _ string ) ([]string , cobra.ShellCompDirective ) {
1189- restartOptions := []string {define .RestartPolicyAlways , define .RestartPolicyNo ,
1190- define .RestartPolicyOnFailure , define .RestartPolicyUnlessStopped }
1189+ restartOptions := []string {
1190+ define .RestartPolicyAlways , define .RestartPolicyNo ,
1191+ define .RestartPolicyOnFailure , define .RestartPolicyUnlessStopped ,
1192+ }
11911193 return restartOptions , cobra .ShellCompDirectiveNoFileComp
11921194}
11931195
@@ -1595,7 +1597,8 @@ func getMethodNames(f reflect.Value, prefix string) []formatSuggestion {
15951597// -> "container=", "event=", "image=", "pod=", "volume=", "type="
15961598func AutocompleteEventFilter (cmd * cobra.Command , _ []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
15971599 event := func (_ string ) ([]string , cobra.ShellCompDirective ) {
1598- return []string {events .Attach .String (), events .AutoUpdate .String (), events .Checkpoint .String (), events .Cleanup .String (),
1600+ return []string {
1601+ events .Attach .String (), events .AutoUpdate .String (), events .Checkpoint .String (), events .Cleanup .String (),
15991602 events .Commit .String (), events .Create .String (), events .Exec .String (), events .ExecDied .String (),
16001603 events .Exited .String (), events .Export .String (), events .Import .String (), events .Init .String (), events .Kill .String (),
16011604 events .LoadFromArchive .String (), events .Mount .String (), events .NetworkConnect .String (),
@@ -1607,7 +1610,8 @@ func AutocompleteEventFilter(cmd *cobra.Command, _ []string, toComplete string)
16071610 }, cobra .ShellCompDirectiveNoFileComp
16081611 }
16091612 eventTypes := func (_ string ) ([]string , cobra.ShellCompDirective ) {
1610- return []string {events .Container .String (), events .Image .String (), events .Network .String (),
1613+ return []string {
1614+ events .Container .String (), events .Image .String (), events .Network .String (),
16111615 events .Pod .String (), events .System .String (), events .Volume .String (), events .Secret .String (),
16121616 }, cobra .ShellCompDirectiveNoFileComp
16131617 }
@@ -1710,9 +1714,11 @@ func AutocompleteImageSaveFormat(_ *cobra.Command, _ []string, _ string) ([]stri
17101714// AutocompleteWaitCondition - Autocomplete wait condition options.
17111715// -> "unknown", "configured", "created", "running", "stopped", "paused", "exited", "removing"
17121716func AutocompleteWaitCondition (_ * cobra.Command , _ []string , _ string ) ([]string , cobra.ShellCompDirective ) {
1713- states := []string {"unknown" , "configured" , "created" , "exited" ,
1717+ states := []string {
1718+ "unknown" , "configured" , "created" , "exited" ,
17141719 "healthy" , "initialized" , "paused" , "removing" , "running" ,
1715- "stopped" , "stopping" , "unhealthy" }
1720+ "stopped" , "stopping" , "unhealthy" ,
1721+ }
17161722 return states , cobra .ShellCompDirectiveNoFileComp
17171723}
17181724
@@ -1792,8 +1798,10 @@ func AutocompletePsFilters(cmd *cobra.Command, _ []string, toComplete string) ([
17921798 "command=" : func (s string ) ([]string , cobra.ShellCompDirective ) { return getCommands (cmd , s ) },
17931799 "exited=" : nil ,
17941800 "health=" : func (_ string ) ([]string , cobra.ShellCompDirective ) {
1795- return []string {define .HealthCheckHealthy ,
1796- define .HealthCheckUnhealthy }, cobra .ShellCompDirectiveNoFileComp
1801+ return []string {
1802+ define .HealthCheckHealthy ,
1803+ define .HealthCheckUnhealthy ,
1804+ }, cobra .ShellCompDirectiveNoFileComp
17971805 },
17981806 "id=" : func (s string ) ([]string , cobra.ShellCompDirective ) { return getContainers (cmd , s , completeIDs ) },
17991807 "label=" : nil ,
@@ -1832,8 +1840,10 @@ func AutocompletePodPsFilters(cmd *cobra.Command, _ []string, toComplete string)
18321840 "name=" : func (s string ) ([]string , cobra.ShellCompDirective ) { return getPods (cmd , s , completeNames ) },
18331841 "network=" : func (s string ) ([]string , cobra.ShellCompDirective ) { return getNetworks (cmd , s , completeDefault ) },
18341842 "status=" : func (_ string ) ([]string , cobra.ShellCompDirective ) {
1835- return []string {"stopped" , "running" ,
1836- "paused" , "exited" , "dead" , "created" , "degraded" }, cobra .ShellCompDirectiveNoFileComp
1843+ return []string {
1844+ "stopped" , "running" ,
1845+ "paused" , "exited" , "dead" , "created" , "degraded" ,
1846+ }, cobra .ShellCompDirectiveNoFileComp
18371847 },
18381848 "until=" : nil ,
18391849 }
@@ -2002,7 +2012,6 @@ func AutocompleteSysctl(_ *cobra.Command, _ []string, toComplete string) ([]stri
20022012
20032013 return nil
20042014 })
2005-
20062015 if err != nil {
20072016 return nil , cobra .ShellCompDirectiveError
20082017 }
0 commit comments