Go Tutorial
Go, also called Golang, is a programming language made at Google. It is simple to learn, very fast, and great for building web servers, APIs and command-line tools.
Popular tools such as Docker and Kubernetes are written in Go, and many companies use it for their backend systems.
Why Learn Go?
- Its syntax is small and clean, so beginners pick it up quickly
- Programs compile into one fast file that runs anywhere
- It has built-in support for doing many tasks at the same time
- Backend and cloud jobs ask for Go more and more
What You Will Learn
- Writing and running your first Go program
- Variables, constants and data types
- Operators, if and switch
- The for loop in all its forms
- Arrays, slices and maps
- Functions, multiple return values and errors
- Structs, methods and interfaces
A First Example
Example
package main
import "fmt"
func main() {
name := "Bilal"
fmt.Println("Hello,", name)
}Hello, Bilal
You can run every example on the free Go Playground at go.dev/play, or install Go on your computer from go.dev.
Exercises and Quiz
Every lesson has an exercise at the end, and the last lesson is a full quiz.
Exercise
What is another common name for the Go language?
What to Learn After Go
Once you know Go, learn to build a web API with its standard net/http package. You may also enjoy Rust for systems programming, or Bash to automate your server work.
Want to learn programming with a teacher? The Workownix Python Programming course builds strong coding basics that carry over to Go, online or at our institute in Orangi Town, Karachi.
