You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Unmarshal wraps json.Unmarshal.// It will convert yaml to json before unmarshal.// Since json is a subset of yaml, passing json through this method should be a no-op.funcUnmarshal(data []byte, vinterface{}) error {
data, err:=yamljsontool.YAMLToJSON(data)
iferr!=nil {
returnfmt.Errorf("%s: convert yaml to json failed: %v", data, err)
}
json.Unmarshal(data, v)
returnjson.Unmarshal(data, v)
}
The text was updated successfully, but these errors were encountered:
Describe the bug
I found duplicate Unmarshal in the course of reading the code
branch: master
commit: b7ba81d
path :
github.com/megaease/easegress/pkg/util/codectool
The text was updated successfully, but these errors were encountered: