MCPcopy Create free account
hub / github.com/containerd/nerdctl / VolumeNames

Function VolumeNames

cmd/nerdctl/completion/completion.go:144–158  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

142}
143
144func VolumeNames(cmd *cobra.Command) ([]string, cobra.ShellCompDirective) {
145 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
146 if err != nil {
147 return nil, cobra.ShellCompDirectiveError
148 }
149 vols, err := getVolumes(cmd, globalOptions)
150 if err != nil {
151 return nil, cobra.ShellCompDirectiveError
152 }
153 candidates := []string{}
154 for _, v := range vols {
155 candidates = append(candidates, v.Name)
156 }
157 return candidates, cobra.ShellCompDirectiveNoFileComp
158}
159
160func Platforms(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
161 candidates := []string{

Callers 2

removeShellCompleteFunction · 0.92

Calls 2

ProcessRootCmdFlagsFunction · 0.92
getVolumesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…