5. Building Microservices in Go
Sam Newman, Building Microservices
Every service you build should be a microservice, and, as we’ve discussed earlier in the book, we generally disagree with using the prefix micro at all. In this chapter we’re going to be building a service, but this chapter is as much about the process as it is about the end result.
We’ll start by following the practice of API First, designing our service’s RESTful contract before we write a single line of code. Then, when it does come time to write code, we’re going to start by writing tests first. By writing small tests that go from failure to passing, we will gradually ...