| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
UnmarshalText("") returned a bare io.EOF error which is confusing
because io.EOF typically signals a Reader was already consumed.
Return a descriptive "cannot scan empty string" error instead.
Fixes ericlagergren#190
| Back | FazBrowse Home | New Git URL |
Fixes #190
Problem
UnmarshalText([]byte("")) returns a bare io.EOF error:
This is confusing in JSON unmarshaling contexts where io.EOF is typically interpreted as the input stream being exhausted, not as invalid input.
Fix
In scanSign, convert io.EOF to a descriptive error: "decimal: cannot scan empty string".