File tree Expand file tree Collapse file tree 2 files changed +0
-11
lines changed
Expand file tree Collapse file tree 2 files changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -79,13 +79,6 @@ func (opts *ListOpts) GetMap() map[string]struct{} {
7979 return ret
8080}
8181
82- // GetAll returns the values of slice.
83- //
84- // Deprecated: use [ListOpts.GetSlice] instead. This method will be removed in a future release.
85- func (opts * ListOpts ) GetAll () []string {
86- return * opts .values
87- }
88-
8982// GetSlice returns the values of slice.
9083//
9184// It implements [cobra.SliceValue] to allow shell completion to be provided
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ func TestMapOpts(t *testing.T) {
112112 }
113113}
114114
115- //nolint:gocyclo // ignore "cyclomatic complexity 17 is too high"
116115func TestListOptsWithoutValidator (t * testing.T ) {
117116 o := NewListOpts (nil )
118117 err := o .Set ("foo" )
@@ -146,9 +145,6 @@ func TestListOptsWithoutValidator(t *testing.T) {
146145 if o .String () != "[bar bar]" {
147146 t .Errorf ("%s != [bar bar]" , o .String ())
148147 }
149- if listOpts := o .GetAll (); len (listOpts ) != 2 || listOpts [0 ] != "bar" || listOpts [1 ] != "bar" {
150- t .Errorf ("Expected [[bar bar]], got [%v]" , listOpts )
151- }
152148 if listOpts := o .GetSlice (); len (listOpts ) != 2 || listOpts [0 ] != "bar" || listOpts [1 ] != "bar" {
153149 t .Errorf ("Expected [[bar bar]], got [%v]" , listOpts )
154150 }
You can’t perform that action at this time.
0 commit comments