mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix issue in gyaml for invalid decoding result of type map[interface{}]interface{}
This commit is contained in:
@ -12,7 +12,7 @@ import (
|
||||
|
||||
"github.com/gogf/gf/util/gconv"
|
||||
|
||||
yaml3 "gopkg.in/yaml.v3"
|
||||
yaml3 "github.com/gf-third/yaml/v3"
|
||||
)
|
||||
|
||||
func Encode(v interface{}) ([]byte, error) {
|
||||
@ -24,7 +24,7 @@ func Decode(v []byte) (interface{}, error) {
|
||||
if err := yaml3.Unmarshal(v, &result); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return gconv.Map(result), nil
|
||||
return gconv.MapDeep(result), nil
|
||||
}
|
||||
|
||||
func DecodeTo(v []byte, result interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user