WeCodeAcademy

Go Introduction

Go (or Golang) was created at Google to be simple, fast and good at doing many things at once. It powers Docker, Kubernetes and many cloud services. Go compiles quickly to a single program with no extra runtime needed.

ExampleGo
package main

import "fmt"

func main() {
  fmt.Println("Hello, World!")
}
Output
Hello, World!

Every Go file starts with a package. The main package with a main function is where a program begins. import "fmt" loads the formatting library. To try an example, save it as main.go and run go run main.go. The output under each example is the real output.

Quick check

What is the entry point of a Go program?

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.