diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-02-10 13:52:37 -0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-02-13 21:00:42 +0000 |
commit | 1e9925f461c54f5fdc100f9f23916b3df81262ce (patch) | |
tree | aad184f245cd81cae052156c287625cd66bba4de /api | |
parent | 790f25052d829578ffc3eabc29e90175e28aeb80 (diff) | |
download | go-git-1e9925f461c54f5fdc100f9f23916b3df81262ce.tar.gz |
slices: new package
This copies parts of x/exp/slices into the standard library.
We omit all functions that depend on constraints.Ordered,
and the Func variants of all such functions. In particular this
omits the various Sort and Search functions.
Fixes #57433
Change-Id: I3c28f4c2e6bd1e3c9ad70e120a0dd68065388f77
Reviewed-on: https://go-review.googlesource.com/c/go/+/467417
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eli Bendersky <eliben@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/57433.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/api/next/57433.txt b/api/next/57433.txt new file mode 100644 index 0000000000..3b301b6093 --- /dev/null +++ b/api/next/57433.txt @@ -0,0 +1,14 @@ +pkg slices, func Clip[$0 interface{ ~[]$1 }, $1 interface{}]($0) $0 #57433 +pkg slices, func Clone[$0 interface{ ~[]$1 }, $1 interface{}]($0) $0 #57433 +pkg slices, func CompactFunc[$0 interface{ ~[]$1 }, $1 interface{}]($0, func($1, $1) bool) $0 #57433 +pkg slices, func Compact[$0 interface{ ~[]$1 }, $1 comparable]($0) $0 #57433 +pkg slices, func ContainsFunc[$0 interface{}]([]$0, func($0) bool) bool #57433 +pkg slices, func Contains[$0 comparable]([]$0, $0) bool #57433 +pkg slices, func Delete[$0 interface{ ~[]$1 }, $1 interface{}]($0, int, int) $0 #57433 +pkg slices, func EqualFunc[$0 interface{}, $1 interface{}]([]$0, []$1, func($0, $1) bool) bool #57433 +pkg slices, func Equal[$0 comparable]([]$0, []$0) bool #57433 +pkg slices, func Grow[$0 interface{ ~[]$1 }, $1 interface{}]($0, int) $0 #57433 +pkg slices, func IndexFunc[$0 interface{}]([]$0, func($0) bool) int #57433 +pkg slices, func Index[$0 comparable]([]$0, $0) int #57433 +pkg slices, func Insert[$0 interface{ ~[]$1 }, $1 interface{}]($0, int, ...$1) $0 #57433 +pkg slices, func Replace[$0 interface{ ~[]$1 }, $1 interface{}]($0, int, int, ...$1) $0 #57433 |