jsonUtil Optimize the definition of var (#80)

This commit is contained in:
libin
2024-07-30 10:07:32 +08:00
committed by GitHub
parent 702107dd05
commit 0990bbce4d
3 changed files with 115 additions and 11 deletions

View File

@@ -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:
//