1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-09 07:02:29 +08:00

refactor: interface{} -> any

This commit is contained in:
dudaodong
2022-03-16 18:41:40 +08:00
parent af480efa8c
commit c939b26cb8
34 changed files with 194 additions and 195 deletions

View File

@@ -136,7 +136,7 @@ func main() {
<b>Signature:</b>
```go
func ToBytes(data interface{}) ([]byte, error)
func ToBytes(data any) ([]byte, error)
```
<b>Example:</b>
@@ -199,7 +199,7 @@ func main() {
<b>Signature:</b>
```go
func ToFloat(value interface{}) (float64, error)
func ToFloat(value any) (float64, error)
```
<b>Example:</b>
@@ -232,7 +232,7 @@ func main() {
<b>Signature:</b>
```go
func ToInt(value interface{}) (int64, error)
func ToInt(value any) (int64, error)
```
<b>Example:</b>
@@ -265,7 +265,7 @@ func main() {
<b>Signature:</b>
```go
func ToJson(value interface{}) (string, error)
func ToJson(value any) (string, error)
```
<b>Example:</b>
@@ -293,7 +293,7 @@ func main() {
<b>Signature:</b>
```go
func ToString(value interface{}) string
func ToString(value any) string
```
<b>Example:</b>
@@ -321,7 +321,7 @@ func main() {
<b>Signature:</b>
```go
func StructToMap(value interface{}) (map[string]interface{}, error)
func StructToMap(value any) (map[string]any, error)
```
<b>Example:</b>