We’ll start off by creating a simple Go application that will act as the main entrypoint for our REST API.
We’ll also be wanting to initialize our project using the github cli as well:
$ gh repo create TutorialEdge/production-ready-api
This will provide a series of options that you can choose from. We’ll be wanting to create a public repository and you’ll want to change TutorialEdge to your own github project.
Now that we have our project’s directory setup and it configured with git, let’s dive in to initializing our project using go modules:
$ go mod init github.com/tutorialedge/production-ready-api
This will generate a go.mod
file for our project.