Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

1

Share

Download to read offline

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.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

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
  • KathrynJonas

    May. 3, 2018

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.

Views

Total views

245

On Slideshare

0

From embeds

0

Number of embeds

5

Actions

Downloads

2

Shares

0

Comments

0

Likes

1

×