mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-23 13:52:26 +08:00
doc: update doc for slice retry random package
This commit is contained in:
@@ -108,7 +108,7 @@ import (
|
|||||||
func AppendIfAbsent[T comparable](slice []T, item T) []T
|
func AppendIfAbsent[T comparable](slice []T, item T) []T
|
||||||
```
|
```
|
||||||
|
|
||||||
<b>Example:<span class="run-container">[Run](https://go.dev/play/p/xnAOOXv9GkS)</span></b>
|
<b>Example:<span class="run-container">[Run](https://go.dev/play/p/GNdv7Jg2Taj)</span></b>
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
@@ -139,7 +139,7 @@ func main() {
|
|||||||
func Contain[T comparable](slice []T, target T) bool
|
func Contain[T comparable](slice []T, target T) bool
|
||||||
```
|
```
|
||||||
|
|
||||||
<b>Example:<span class="run-container">[Run](https://go.dev/play/p/xnAOOXv9GkS)</span></b>
|
<b>Example:<span class="run-container">[Run](https://go.dev/play/p/_454yEHcNjf)</span></b>
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
@@ -170,7 +170,7 @@ func main() {
|
|||||||
func ContainBy[T any](slice []T, predicate func(item T) bool) bool
|
func ContainBy[T any](slice []T, predicate func(item T) bool) bool
|
||||||
```
|
```
|
||||||
|
|
||||||
<b>Example:<span class="run-container">[Run](https://go.dev/play/p/xnAOOXv9GkS)</span></b>
|
<b>Example:<span class="run-container">[Run](https://go.dev/play/p/49tkHfX4GNc)</span></b>
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
|
|||||||
Reference in New Issue
Block a user