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.