1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-06 05:42:25 +08:00

doc: update slice document

This commit is contained in:
dudaodong
2022-07-29 13:31:04 +08:00
parent 979381bfb7
commit f8096e3585
2 changed files with 6 additions and 6 deletions

View File

@@ -77,7 +77,7 @@ import (
<b>Signature:</b>
```go
func AppendIfAbsent[T comparable](slice []T, value T) []T
func AppendIfAbsent(slice interface{}, value interface{}) interface{}
```
<b>Example:</b>
@@ -1012,7 +1012,7 @@ func main() {
<b>Signature:</b>
```go
func ToSlice[T any](value ...T) []T
func ToSlice(value ...interface{}) interface{}
```
<b>Example:</b>
@@ -1036,7 +1036,7 @@ func main() {
<b>Signature:</b>
```go
func ToSlicePointer[T any](value ...T) []*T
func ToSlicePointer(value ...interface{}) []*interface{}
```
<b>Example:</b>

View File

@@ -72,7 +72,7 @@ import (
<b>函数签名:</b>
```go
func AppendIfAbsent[T comparable](slice []T, value T) []T
func AppendIfAbsent(slice interface{}, value interface{}) interface{}
```
<b>例子:</b>
@@ -1011,7 +1011,7 @@ func main() {
<b>函数签名:</b>
```go
func ToSlice[T any](value ...T) []T
func ToSlice(value ...interface{}) interface{}
```
<b>例子:</b>
@@ -1035,7 +1035,7 @@ func main() {
<b>函数签名:</b>
```go
func ToSlicePointer[T any](value ...T) []*T
func ToSlicePointer(value ...interface{}) []*interface{}
```
<b>例子:</b>