Skip to content

Instantly share code, notes, and snippets.

@MatMoore
Created November 23, 2016 10:30
Show Gist options
  • Select an option

  • Save MatMoore/c6009b3df45a5d078d3ad45e23fff7b7 to your computer and use it in GitHub Desktop.

Select an option

Save MatMoore/c6009b3df45a5d078d3ad45e23fff7b7 to your computer and use it in GitHub Desktop.
Go exercise
* Exercise - Latency as a Service
We're going to build a microservice to provide latency.
https://twitter.com/tenderlove/status/573907559871971328
- GET `/latency` - returns the string "OK" after 500ms
- GET `/latency?duration=100ms` - override the default delay duration. The value can be any string accepted by `time.ParseDuration`.
- An invalid duration parameter should return a 400 along with an error message.
Stretch goal: Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment