Set Up the Project
Distributed Services with Go — by Travis Jeffery (10 / 84)
--
👈 How JSON over HTTP Services Fits into Distribut ed Systems | TOC | Build a Commit Log Prototype 👉
The first thing we need to do is create a directory for our project’s code. Since we’re using Go 1.13+, we’ll take advantage of modules[2] so you don’t have to put your code under your GOPATH. We’ll call our project proglog, so open your terminal to wherever you like to put your code and run the following commands to set up your module:
$ mkdir proglog
$ cd proglog
$ go mod init github.com/travisjeffery/proglog
Replace travisjeffery with your own GitHub username or with github.com if you use something like Bitbucket, but keep in mind as you’re working through this book that the code examples all have github.com/travisjeffery/proglog as the import path, so if you’re using your own import path, you must change the code examples to use that import path.
👈 How JSON over HTTP Services Fits into Distribut ed Systems | TOC | Build a Commit Log Prototype 👉
Distributed Services with Go by Travis Jeffery can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.