ProgrammingBeginnerGo

Go Programming Fundamentals

Learn Go from the type system up: structs, methods and interfaces, then slices, maps, errors as values, and goroutines with channels.

Go was designed at Google in 2007 to answer a specific complaint: a large codebase that took a long time to build, was hard to reason about, and encouraged cleverness. The answer was a language that is small on purpose. It has no inheritance, no exceptions, no null, no operator overloading, and roughly ninety keywords in total. What it has instead is worth learning. Every type has a meaningful zero value, so you never have to remember to initialise something. Structs and arrays are copied when you pass them, which makes data flow explicit. Errors are ordinary return values, so failure is visible in the signature rather than hidden in a control-flow mechanism. And goroutines plus channels make concurrency ordinary rather than exceptional. This course builds Go from the type system up. You start with variables and control flow, move into structs, methods and interfaces — including the parts that trip people up, like the difference between value and pointer receivers and the typed-nil trap — then slices, maps and errors, and finally concurrency. The last module builds a small HTTP service with only the standard library.

4.7 (120) 940 students 133 min 15 lessons 180 XP on completion

What you will be able to do

  • Explain what a Go zero value is and why it removes a whole class of uninitialised bugs
  • Choose correctly between a value receiver and a pointer receiver, and say what the method set implies
  • Avoid the slice aliasing bug by reasoning about the slice header, length and capacity
  • Return, wrap and inspect errors with errors.Is, errors.As and fmt.Errorf, instead of panicking
  • Run concurrent work with goroutines and channels, and use sync.WaitGroup and select to know when it is done
  • Write a working HTTP handler and JSON API using only the standard library

Assessments

Dashboard