How to learn Golang

Start with these.

  1. A tour of Golang
  2. Golang by Example

Use only std packages when you are a beginner.

Install the latest version

  1. Install Version Manager
  2. Use $gvm install go1.13 &&gvm use go1.13 [--default] while you refer to the release history.
  • $go mod init creates a new module, initializing the go.mod file that describes it.

  • $go build, $go test, and other package-building commands add new dependencies to go.mod as needed.

  • $go list -m all prints the dependencies.

  • $go get changes the required version of a dependency (or adds a new dependency).

  • $go mod tidy removes unused dependencies.

Learn how to structure the projects

  1. Use Golang moudles.
  2. Refer to this example.

Write code

  1. Official Web Project, its code and this blog
  2. JSON and this blog
  3. SQL
  4. gRPC and make it work with module.

READ MORE

  1. Golang Blog
  2. Web Examples