diff --git a/opts/opts.go b/opts/opts.go index e7a97a573e..472188d8bc 100644 --- a/opts/opts.go +++ b/opts/opts.go @@ -79,13 +79,6 @@ func (opts *ListOpts) GetMap() map[string]struct{} { return ret } -// 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 -} - // GetSlice returns the values of slice. // // It implements [cobra.SliceValue] to allow shell completion to be provided diff --git a/opts/opts_test.go b/opts/opts_test.go index 7dc87cad9e..c5908e8f15 100644 --- a/opts/opts_test.go +++ b/opts/opts_test.go @@ -112,7 +112,6 @@ func TestMapOpts(t *testing.T) { } } -//nolint:gocyclo // ignore "cyclomatic complexity 17 is too high" func TestListOptsWithoutValidator(t *testing.T) { o := NewListOpts(nil) err := o.Set("foo") @@ -146,9 +145,6 @@ func TestListOptsWithoutValidator(t *testing.T) { if o.String() != "[bar bar]" { t.Errorf("%s != [bar bar]", o.String()) } - if listOpts := o.GetAll(); len(listOpts) != 2 || listOpts[0] != "bar" || listOpts[1] != "bar" { - t.Errorf("Expected [[bar bar]], got [%v]", listOpts) - } if listOpts := o.GetSlice(); len(listOpts) != 2 || listOpts[0] != "bar" || listOpts[1] != "bar" { t.Errorf("Expected [[bar bar]], got [%v]", listOpts) }