mirror of https://github.com/docker/cli.git
opts: deprecate ListOpts.GetAll in favor of ListOpts.GetSlice
The `GetSlice()` function is part of cobra's [cobra.SliceValue] interface, and duplicates the older `GetAll()` method. This patch deprecates the `GetAll()` method in favor of `GetSlice()`. [cobra.SliceValue]: https://pkg.go.dev/github.com/spf13/cobra@v1.9.1#SliceValue Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ca199577a9
commit
5215b1eca4
|
@ -80,6 +80,8 @@ func (opts *ListOpts) GetMap() map[string]struct{} {
|
|||
}
|
||||
|
||||
// GetAll returns the values of slice.
|
||||
//
|
||||
// Deprecated: use [ListOpts.GetSlice] instead. This method will be removed in a future release.
|
||||
func (opts *ListOpts) GetAll() []string {
|
||||
return *opts.values
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue