Configuration

Night mode

Minimum Viable Program

A$AP Learn Go (GoLang) 🚀 Course

Engineers From These Top Companies and Universities Trust EXLskills

1M+ Professionals | 100+ Institutions

This is the EXLskills free and open-source A$AP Learn GoLang Course! It's a highly-accelerated open course that's best-suited for people with a bit of background in software engineering to quickly pick up Go, learn the essential best practices, and hit the ground running!
After this course, you'll be able to build basic Go applications in addition to lightweight webservers, highly-concurrent programs, and reusable libraries in Go that you can share with other developers!
For further practice, we recommend checking out our Go Guided Projects that will give you access to a professional Go developer, detailed documentation, and real-world tasks that you can work on to go from the basics of Go, into building production apps.

Is this course FREE?

Yes, this a 100% free course that you can contribute to on GitHub here!

Have more questions?

Introduction

Minimum Viable Program

Minimum Requirements for a Valid Program

Our Minimal Go Program

This is roughly the minimal, "Hello World," Go program. There are certainly ways to make it smaller, but we're just trying to make sure that we write more or less "idiomatic" Go code, which means code that generally adheres to the "Go way of doing things." This makes it much easier to join real Go projects, since Go developers try to use consistent constructs and approaches to common problems.

// All .go files must have a package declaration as the first line of source code
// NB: The `main` package is a special name that's used to build an executable, as opposed to a library
package main
// Go uses `import` to specify which packages this file requires
// NB: You will get a *compile-time* error if you import a package that you do not actually used
import (
"fmt"
)
// We use this syntax to define a function in Go
// The function `main()` is reserved for the entry-point of our program
func main() {
fmt.Println("This is a teeny tiny Go program!")
}
/* By the way,
Go allows us to have multi-line comments
like this. Nice :)
*/

Now that you've got your first Go program running, let's really get started…