Hello!
Currently there is no error checking in decoder, e.g. in DecodeToInt64():
idx = strings.IndexRune(e.encode, v)
...
c = int64(idx) * ...
strings.IndexRune() could return -1 here.
Would you accept a pull request that adds error checking?
What approach would you prefer?
panic() on error;
- change return type from
int64 to int64, error (this will break API);
- add new function with
int64, error return type?
Hello!
Currently there is no error checking in decoder, e.g. in
DecodeToInt64():strings.IndexRune()could return-1here.Would you accept a pull request that adds error checking?
What approach would you prefer?
panic()on error;int64toint64, error(this will break API);int64, errorreturn type?