I'm currently developing a simple go-based web service and a CLI client for it. The following are some useful articles and resources specifically focused on HTTP API development and design, listed here for future reference.
For more general golang web development materials, see this gist.
-
the newstack tutorial - nice walkthrough of the basics with sample code for each iteration
-
how i start - tutorial demonstrating how to setup a basic REST API which utilizes some existing REST APIs
-
basic demo - just the basics, representing a users resource.
-
web service demo - implements a RESTful CRUD API with MongoDB for persistence, also representing a users resource.
-
boltdb demo - a simple guestbook app using boltdb for persistence.
-
basics - basic conventions for developing web apis
-
quick reference - nice reference with a summary a [basic tips](http://www.restapitutorial.com/lessons/ restquicktips.html)
-
- [resource-oriented architecture](http://www.crummy.com/writing/restful-web- services/html/#calibre_link-33)
- [best practices](http://www.crummy.com/writing/restful-web-services/html/ #calibre_link-15)
-
design guide - best practices for designing HTTP+JSON APIs
-
testing http client code - recommendations for testing your client code using Go's
httptest
package, from the creator ofgo-github
, Will Norris. -
patch strategies - a technique for marshalling structs with intentionally empty values when doing partial updates with
PATCH
, also from Will Norris.