Skip to content

Commit 9e4783c

Browse files
committed
Remove SetOne
1 parent 83973f3 commit 9e4783c

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

flag_slice_base.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ func NewSliceBase[T any, C any, VC ValueCreator[T, C]](defaults ...T) *SliceBase
3333
}
3434
}
3535

36-
// SetOne directly adds a value to the list of values
37-
func (i *SliceBase[T, C, VC]) SetOne(value T) {
38-
if !i.hasBeenSet {
39-
*i.slice = []T{}
40-
i.hasBeenSet = true
41-
}
42-
43-
*i.slice = append(*i.slice, value)
44-
}
45-
4636
// Set parses the value and appends it to the list of values
4737
func (i *SliceBase[T, C, VC]) Set(value string) error {
4838
if !i.hasBeenSet {

godoc-current.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,6 @@ func (i *SliceBase[T, C, VC]) Serialize() string
901901
func (i *SliceBase[T, C, VC]) Set(value string) error
902902
Set parses the value and appends it to the list of values
903903

904-
func (i *SliceBase[T, C, VC]) SetOne(value T)
905-
SetOne directly adds a value to the list of values
906-
907904
func (i *SliceBase[T, C, VC]) String() string
908905
String returns a readable representation of this value (for usage defaults)
909906

testdata/godoc-v3.x.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,6 @@ func (i *SliceBase[T, C, VC]) Serialize() string
901901
func (i *SliceBase[T, C, VC]) Set(value string) error
902902
Set parses the value and appends it to the list of values
903903

904-
func (i *SliceBase[T, C, VC]) SetOne(value T)
905-
SetOne directly adds a value to the list of values
906-
907904
func (i *SliceBase[T, C, VC]) String() string
908905
String returns a readable representation of this value (for usage defaults)
909906

0 commit comments

Comments
 (0)