RANIARANIA Academy

Go Fundamentals — Variables, Types & Control Flow

Learn to write core Go syntax fluently — declaring variables, choosing basic types, defining constants with iota, and steering programs with if, switch and Go's single for loop. You finish able to read and write small, idiomatic Go programs with functions, multiple return values, packages and fmt formatting, ready to tick "write core Go syntax" on any back-end role.

Watch the free preview

Declaring variables with var and := — free to watch, no account needed.

Go (Golang) BEGINNER · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Write core Go syntax fluently across variables, types, control flow and functions
  • Declare variables with var and := and choose the right basic type and zero value
  • Define grouped constants and enumerations using const and iota
  • Steer programs with if, switch and Go's single for loop
  • Write functions with multiple return values and format output with the fmt package

Syllabus

Variables and Basic Types
Declaring variables with var and :=Free preview15 min
Basic types, zero values and conversions15 min
Constants and Control Flow Decisions
Constants and iota enumerations15 min
Branching with if and switch15 min
Loops and Functions
for — Go's only loop15 min
Functions and multiple return values15 min
Packages, Imports and Formatting
Packages and imports15 min
Formatting output with fmt15 min
Lab — 10 Exercises & Solutions
Exercises 1–515 min
Exercises 6–1015 min