Skip to content

aymanapatel/golang-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Microservice Project

Repository to learn Golang Microservices by building an end-to-end project.
🔨 Libraries used: 🔨

Feature 0: Setup Go

Table of Contents

Links

  1. Set up Go Environment and Go modules in VSCode Medium

  2. Go Modules outside #GO_PATH in Docker

Setup Go environment

Demo with go mod

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

Working

Stack Overflow

  • Change hello.go to handlers.go

ServeMux and handler

Reference Go documentaton

  1. DefaultServeMux Do not use DefaultServeMux, as it is a global variable. Hence, it is not secure.

Refer Golang doc.

About

Learning Go by building an end-to-end cloud native microservice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages