Skip to content

Commit

Permalink
revert adding check to make sure behavior is identical
Browse files Browse the repository at this point in the history
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
  • Loading branch information
inteon committed Oct 29, 2021
1 parent 46e3f76 commit 5faa105
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ func jsonUnmarshal(reader io.Reader, obj interface{}, opts ...JSONOpt) error {
// optionally performing the unmarshalling strictly
func unmarshal(yamlBytes []byte, obj interface{}, unmarshalFn func([]byte, interface{}) error, opts ...JSONOpt) error {
jsonTarget := reflect.ValueOf(obj)
if jsonTarget.Kind() != reflect.Ptr || jsonTarget.IsNil() {
return fmt.Errorf("provided object is not a valid pointer")
}

jsonBytes, err := yamlToJSONTarget(yamlBytes, &jsonTarget, unmarshalFn)
if err != nil {
Expand Down

0 comments on commit 5faa105

Please sign in to comment.