Closed craftgear closed 8 years ago
When you have actual data strings with facing and/or trailing spaces, error messages are confusing.
For example an actual data is " expected" then error message is:
Data[9].title expected string: "expected" actual string: "expected"
In this case actual string should be shown with a facing space.
clean() function causes this. https://github.com/matryer/silk/blob/87124e93cc78cbee0f495245e5eace81f3ad7b08/parse/detail.go#L41
clean()
Are these Trim callings really necessary?
Trim
Perhaps we shouldn't clean when reporting errors?
I think it would be a nice feature.
Anyone want to do a PR?
When you have actual data strings with facing and/or trailing spaces, error messages are confusing.
For example an actual data is " expected" then error message is:
In this case actual string should be shown with a facing space.
clean()
function causes this. https://github.com/matryer/silk/blob/87124e93cc78cbee0f495245e5eace81f3ad7b08/parse/detail.go#L41Are these
Trim
callings really necessary?