go-godo / godo

golang build tool in the spirt of rake, gulp
MIT License
536 stars 31 forks source link

Must* and HTTP functions #13

Closed GeertJohan closed 9 years ago

GeertJohan commented 9 years ago

Sorry for having two features in one PR. The second feature requires the first one.

I have added a wrapper for simple HTTP GET's: HTTPGetString(url string) returns the HTTP GET response body as string and optionally an error. That function is wrapped by MustHTTPGetString(url string), which doesnt return a second value (error), but instead panics when an error occurs. The panic is recovered at *Project.run(..) so it is nicely printed without stacktrace.

I think the Must* approach can be used for multiple other godo helper functions.

GeertJohan commented 9 years ago

Closing this PR, did something wrong (included the Gododir commit)

GeertJohan commented 9 years ago

New PR #14 is correct.