mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-06 07:26:53 +08:00
jsonUtil Optimize the definition of var (#80)
This commit is contained in:
@@ -2,21 +2,11 @@ package jsonUtil
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrPoint 不是指针类型
|
||||
ErrPoint = errors.New("the argument to Result must be a non-nil pointer")
|
||||
// ErrNotMap 不是Map类型
|
||||
ErrNotMap = errors.New("cannot parse map, value is not a map")
|
||||
// ErrNotSlice 不是Slice类型
|
||||
ErrNotSlice = errors.New("cannot parse slice, value is not a slice")
|
||||
)
|
||||
|
||||
// JsonToStruct converts JSON data to a Go structure.
|
||||
// Parameters:
|
||||
//
|
||||
|
Reference in New Issue
Block a user