Closed gandaldf closed 1 year ago
Is it right that MarshalText() function, if the input is not valid, returns the same output ([]byte("null")) as MarshalJSON() function?
MarshalText()
[]byte("null")
MarshalJSON()
https://github.com/google/uuid/blob/44b5fee7c49cf3bcdf723f106b36d56ef13ccc88/null.go#L85
Wouldn't it be better if it returned a[]byte{}? Thank you, and sorry if my question seems stupid.
[]byte{}
Is it right that
MarshalText()
function, if the input is not valid, returns the same output ([]byte("null")
) asMarshalJSON()
function?https://github.com/google/uuid/blob/44b5fee7c49cf3bcdf723f106b36d56ef13ccc88/null.go#L85
Wouldn't it be better if it returned a
[]byte{}
? Thank you, and sorry if my question seems stupid.