Backend development

Stage 1 · Lesson 2 of 10

Go syntax, structs and slices

Your language and how HTTP works

Go is small on purpose, so you can learn most of the language in a few weeks. Start with variables and :=, which declares and sets a variable in one step. Learn functions that return more than one value, for as the only loop, and (groups of named fields) with methods.

Then learn slices and maps, the collections you will use everywhere. A slice is a window onto an underlying array, with a length and a capacity. append may or may not copy that array, so two slices can end up sharing the same memory. Run go fmt and go vet from the first day to format and check your code.

Common trapwriting Go like Java or Python, with getters, setters and deep type hierarchies; idiomatic Go uses plain structs, small functions and .

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with

  • CourseFree
    A Tour of Go

    The Go Authors · Beginner

    The official interactive tour: basics, methods, interfaces, generics and concurrency

Practise

  • Your language track: small exercises with free mentor feedback on idiomatic code

Keep handy

  • Short runnable examples to look up while you write: errors, JSON, goroutines, testing

  • Read the HTTP overview, methods, headers and status code pages until they feel obvious

Also worth your time

Mark this stage as not done?