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
Obviously, I'm trying to unmarshal an invalid Yaml string (unmatched, leading curly brace).
Expectation: A non-nil error is returned. Actual Behaviour: A panic (nil-pointer dereference) is raised (see log at the end of the post).
Interestingly, the string "{{this is invalid}" returns a non-nil error, as well as the string "this is{ invalid". The panic only seems to occur when the curly brace is at the beginning of the string and there are no other curly braces anywhere.
I have the following code snippet:
Playground: https://play.golang.org/p/9nZNkWEopY6
Obviously, I'm trying to unmarshal an invalid Yaml string (unmatched, leading curly brace).
Expectation: A non-nil error is returned.
Actual Behaviour: A panic (nil-pointer dereference) is raised (see log at the end of the post).
Interestingly, the string
"{{this is invalid}"
returns a non-nil error, as well as the string"this is{ invalid"
. The panic only seems to occur when the curly brace is at the beginning of the string and there are no other curly braces anywhere.The text was updated successfully, but these errors were encountered: