@@ -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
@@ -132,43 +125,6 @@ func (opts *ListOpts) WithValidator(validator ValidatorFctType) *ListOpts {
132125 return opts
133126}
134127
135- // NamedOption is an interface that list and map options
136- // with names implement.
137- //
138- // Deprecated: NamedOption is no longer used and will be removed in the next release.
139- type NamedOption interface {
140- Name () string
141- }
142-
143- // NamedListOpts is a ListOpts with a configuration name.
144- // This struct is useful to keep reference to the assigned
145- // field name in the internal configuration struct.
146- //
147- // Deprecated: NamedListOpts is no longer used and will be removed in the next release.
148- type NamedListOpts struct {
149- name string
150- ListOpts
151- }
152-
153- var _ NamedOption = & NamedListOpts {}
154-
155- // NewNamedListOptsRef creates a reference to a new NamedListOpts struct.
156- //
157- // Deprecated: NewNamedListOptsRef is no longer used and will be removed in the next release.
158- func NewNamedListOptsRef (name string , values * []string , validator ValidatorFctType ) * NamedListOpts {
159- return & NamedListOpts {
160- name : name ,
161- ListOpts : * NewListOptsRef (values , validator ),
162- }
163- }
164-
165- // Name returns the name of the NamedListOpts in the configuration.
166- //
167- // Deprecated: NamedListOpts is no longer used and will be removed in the next release.
168- func (o * NamedListOpts ) Name () string {
169- return o .name
170- }
171-
172128// MapOpts holds a map of values and a validation function.
173129type MapOpts struct {
174130 values map [string ]string
@@ -215,35 +171,6 @@ func NewMapOpts(values map[string]string, validator ValidatorFctType) *MapOpts {
215171 }
216172}
217173
218- // NamedMapOpts is a MapOpts struct with a configuration name.
219- // This struct is useful to keep reference to the assigned
220- // field name in the internal configuration struct.
221- //
222- // Deprecated: NamedMapOpts is no longer used and will be removed in the next release.
223- type NamedMapOpts struct {
224- name string
225- MapOpts
226- }
227-
228- var _ NamedOption = & NamedMapOpts {}
229-
230- // NewNamedMapOpts creates a reference to a new NamedMapOpts struct.
231- //
232- // Deprecated: NamedMapOpts is no longer used and will be removed in the next release.
233- func NewNamedMapOpts (name string , values map [string ]string , validator ValidatorFctType ) * NamedMapOpts {
234- return & NamedMapOpts {
235- name : name ,
236- MapOpts : * NewMapOpts (values , validator ),
237- }
238- }
239-
240- // Name returns the name of the NamedMapOpts in the configuration.
241- //
242- // Deprecated: NamedMapOpts is no longer used and will be removed in the next release.
243- func (o * NamedMapOpts ) Name () string {
244- return o .name
245- }
246-
247174// ValidatorFctType defines a validator function that returns a validated string and/or an error.
248175type ValidatorFctType func (val string ) (string , error )
249176
0 commit comments