tobi/mogrify-go — pull request #1 by aybabtme (2014-04-20 03:38:04+00:00)
Title: Add docs, more errors, fix tests, add examples.

Good morning!

* __Add docs__: I've written some docs for all the exported fields.
* __Add examples__: I replaced the `example/resize.go` file by Go examples, which are part of the test suite and show up in the docs.

See the docs + examples : http://godoc.org/github.com/aybabtme/mogrify-go

* __More errors__: replaced some calls that required nil-checks (not idiomatic in Go) by errors. I think more could be done for the cases where methods on gdImage panics for various operations that could be errors. However I'm not familiar enough so I didn't venture this way.
* __Fix tests__: the tests were passing an `asset` string argument to the `asset(...)` helper func, which was diligently ignoring it and always opening the same file.

r: @tobi
cc: @boourns
This PR includes commits I've found in @boourns fork, so this builds on top of it.