Successfully reported this slideshow.
Your SlideShare is downloading. ×

Future-proof your Go API - GothamGo 2018

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
20111018 boost and gtest
20111018 boost and gtest
Loading in …3
×

Check these out next

1 of 29 Ad

Future-proof your Go API - GothamGo 2018

Download to read offline

These are slides from my talk at GothamGo 2018 in New York, NY.

--

Building and launching an API in Go is great. Maintaining, not so much. I’ll review strategies for testing and versioning your Go API.

These are slides from my talk at GothamGo 2018 in New York, NY.

--

Building and launching an API in Go is great. Maintaining, not so much. I’ll review strategies for testing and versioning your Go API.

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Similar to Future-proof your Go API - GothamGo 2018 (20)

Advertisement

Recently uploaded (20)

Future-proof your Go API - GothamGo 2018

  1. 1. Future-proof your Go API @stevekaliski
  2. 2. Overview 1. Introductions 2. “Future-Proof” 3. Testing 4. Versioning
  3. 3. 👋 Hi!
  4. 4. Future-proof?
  5. 5. Future-Proof - Application - Programming - Interface
  6. 6. Future-Proof - Application - Programming → Less maintenance - Interface → Increased stability
  7. 7. Why Go? - Standard library (net/http, testing) - Type + Interfaces - Go Community + API Frameworks
  8. 8. Testing
  9. 9. net/http/httputil func DumpResponse(resp *http.Response, body bool) ([]byte, error)
  10. 10. abide func AssertHTTPResponse(t *testing.T, id string, w *http.Response) type Assertable interface {
 String() string
 }
  11. 11. Testing - Summary - net/http(/httputil, /httptest) = 👍 - Integrate into existing testing workflow = 👍 - httputil.DumpResponse as catchall = 👍 Future Proof = observability into interface
  12. 12. Versioning
  13. 13. pinned type Version type Change type Versionable interface {
 Data() map[string]interface{}
 } func Apply(v *Version, obj Versionable)
  14. 14. Versioning - Summary - Use `Interface` to support any object = 👍 - Integrate into testing for observability = 👍
  15. 15. Thanks! ● twitter.com/stevekaliski ● github.com/sjkaliski ● sjkaliski@gmail.com
  16. 16. Resources - github.com/beme/abide - github.com/sjkaliski/pinned - github.com/sjkaliski/gotham-go-examples

×