From 5faa105791b48fa150223a070f43e0545b9cec6f Mon Sep 17 00:00:00 2001 From: Inteon <42113979+inteon@users.noreply.github.com> Date: Fri, 29 Oct 2021 17:10:54 +0200 Subject: [PATCH] revert adding check to make sure behavior is identical Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com> --- unmarshal.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/unmarshal.go b/unmarshal.go index 3694ce7..96c4c7a 100644 --- a/unmarshal.go +++ b/unmarshal.go @@ -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 {