/golang-from-the-basics

This repository was made to get familiar with basic syntax and mental model of Go programming language.

Primary LanguageGo

Golang from the basics

What the go is?

Go is concise, clean and effiecient programming language by Google.

A Go Program

The entrypoint of a Go program is main package.

GOPATH, What's that?

GOPATH is the environment variable that defines the root of the workspace.

Where is the default GOPATH?


Windows Unix
%USERPROFILE%/go $HOME/go

Types

  • Almost everything in Go is a Type.
  • They are almost case insensitive.
  • The types of variables should be known in advance.

The Ladder

  1. The starting - Hello World
  2. The Type and variables
  3. Inputs, conversions and parsing
  4. Time and Dates
  5. Building Go project into different os binaries
  6. Memory management
  7. Pointers in Go
  8. Arrays
  9. Slices
  10. Key value pairs - Maps
  11. Structs
  12. Conditionals
  13. Switch case
  14. Loops
  15. Functions
  16. Attaching methods to structs
  17. defer keyword
  18. File system
  19. Http requests
  20. URL
  21. More about HTTP requests
  22. JSON - Javascript Object Notation
  23. Consuming JSON
  24. (Important) - Modules in Golang
  25. A Simple In Memory Reset API
  26. Go Routines
  27. Wait Groups
  28. Mutex and RWMutex
  29. Communication between go routines