mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
refactor: update param name in AppendIfAbsent
This commit is contained in:
1 parent
fc3e94df58
commit
553f63e76b
1 file changed
+4
-4
+4
-4
@@ -853,9 +853,9 @@ func ToSlice[T any](value ...T) []T {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AppendIfAbsent only absent append the value
|
// AppendIfAbsent only absent append the value
|
||||||
func AppendIfAbsent[T comparable](slices []T, value T) []T {
|
func AppendIfAbsent[T comparable](slice []T, value T) []T {
|
||||||
if !Contain(slices, value) {
|
if !Contain(slice, value) {
|
||||||
slices = append(slices, value)
|
slice = append(slice, value)
|
||||||
}
|
}
|
||||||
return slices
|
return slice
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user