Getting started

Go begins as one file and one command. These lessons install the toolchain and put it in front of an editor, then build the first programs: a module and its packages, variables and constants, the types and their zero values, and the conditions a program branches on. The part ends at switch, which needs no break.

001 What Go is and where it runs the language, a static binary, the garbage collector, go run against go build, and the programs Go runs in Open 002 Install Go on Linux, macOS and Windows the archives and packages per system, PATH, go version, the module proxy and the version this course uses Open 003 An editor, gofmt, go vet and go doc the edit-build-run loop, gofmt, go vet, go doc and the tools this image does not have Open 004 Your first Go program hello.go line by line, go run, go build, the exit status and a missing import Open 005 A module, go.mod and module paths go mod init, the go directive, a module path, a package inside the module and go.sum Open 006 Packages, imports and visibility the package clause, imports, exported names, the internal folder and init Open 007 Variables, short declarations and zero values var, :=, the zero value of every type, scope, shadowing and the unused-variable error Open 008 Constants, iota and typed constants const, untyped constants, iota, typed constants and what the compiler folds Open 009 Types, named types and conversions named types, the underlying type, conversions, type aliases and when a conversion is needed Open 010 Integers, floats and overflow the integer widths, division and remainder, floats, NaN, overflow and the math package Open 011 Operators, bits and comparisons arithmetic, bitwise operators, comparisons, logic, precedence and the shift rules Open 012 Conditions, switch and case lists if with an init statement, switch without fallthrough, case lists, type switches named and the missing-condition error Open

Lessons