Skip to content

Conversation

GeertJohan
Copy link
Contributor

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.

Add HTTPGetString and MustHTTPGetString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants