kurrik / json

JSON parser in Go
Apache License 2.0
8 stars 3 forks source link

Removed `fmt` dependency: was mostly being used for error handling. #2

Closed ghost closed 8 years ago

ghost commented 8 years ago

fmt is a big dependency, and I'm looking for ways to remove it in my GopherJS-transpiled code. A lot of packages, including yours, pull fmt in just to use fmt.Errorf, when errors.New would do just as well.

All I've done is change the code to use errors. Tests all pass. :)

I may end up using your parser for a JS project I'm writing because the built-in encoding/json uses fmt also at present!

kurrik commented 8 years ago

I'm open to merging this, would just prefer to have the old lines removed. Thanks!

ghost commented 8 years ago

Sorry, forgot to remove those before committing, after the tests passed. :)

kurrik commented 8 years ago

Merged, thanks!

ghost commented 8 years ago

Thanks! :)