Repository to learn Golang Microservices by building an end-to-end project.
🔨 Libraries used: 🔨
-
Set up Go Environment and Go modules in VSCode Medium
mkdir my-demo // Create a project folder, or clone a github repository
cd my-demo
touch main.go // Create a file if we are starting the project
go mod init my-demo // This will initiate the module
go build // This will build
` Now if you add an import, if VSCODE is configured properly (user.settings), then auto-complete for used imports
- Change
hello.go
tohandlers.go
-
DefaultServeMux Do not use
DefaultServeMux
, as it is a global variable. Hence, it is not secure.