Go Tutorial #11: Goroutines — Lightweight Concurrency

In the previous tutorial, you learned how to organize a Go project. Now it is time for Go’s most powerful feature — goroutines. Goroutines are lightweight threads managed by the Go runtime. They are the reason Go is so popular for servers, microservices, and concurrent programs. You can run millions of goroutines on a single machine. What is a Goroutine? A goroutine is a function that runs concurrently with other goroutines. You start one with the go keyword: ...

April 10, 2026 · 8 min

Go Tutorial #10: Project Structure and Clean Architecture

In the previous tutorial, you learned about pointers. Now it is time to learn how to organize a Go project properly. Good project structure makes your code easy to read, test, and maintain. Go does not force a specific layout, but the community has developed clear conventions. This tutorial teaches you those conventions. Starting Simple — One Package When your project is small, keep it simple. A single main package is fine: ...

April 10, 2026 · 10 min

Go Tutorial #9: Pointers — Simple and Safe

In the previous tutorial, you learned about interfaces and polymorphism. Now it is time to learn about pointers — how Go lets you share and modify data efficiently. If you have used C or C++, you know pointers. Go pointers are simpler. There is no pointer arithmetic. You cannot do math on pointer addresses. This makes Go pointers safe and easy to understand. What is a Pointer? A pointer holds the memory address of a value. Instead of copying the value, you pass its address. This lets functions modify the original value: ...

April 10, 2026 · 10 min

Go Tutorial #8: Interfaces and Polymorphism

In the previous tutorial, you learned about structs, methods, and composition. Now it is time to learn about interfaces — one of Go’s most powerful features. Interfaces in Go are different from most languages. There is no implements keyword. If a type has the right methods, it automatically satisfies the interface. This is called implicit implementation. What is an Interface? An interface defines a set of method signatures. Any type that implements all those methods satisfies the interface: ...

April 9, 2026 · 9 min

WebAssembly Explained: How Your Browser Now Runs at Near-Native Speed

Figma’s canvas engine runs in your browser at desktop speed. Google Earth loads a 3D globe without a plugin. AutoCAD moved from a desktop app to a website. They all use WebAssembly. What is WebAssembly? WebAssembly — Wasm — is a binary format that browsers can run directly. It is not a programming language. It is a compile target. You write code in C++, Rust, Go, or another language. You compile it to a .wasm binary. The browser loads that binary and runs it at near-native speed. ...

April 9, 2026 · 5 min

Go Tutorial #7: Structs, Methods, and Composition

In the previous tutorial, you learned about slices and maps. Now it is time to learn how to create your own types with structs. Go does not have classes. Instead, it uses structs and methods. Structs hold data, and methods add behavior. This is simpler than class-based languages like Java or Python. Defining a Struct A struct groups related fields together: package main import "fmt" type User struct { Name string Email string Age int } func main() { // Create a struct with field names user1 := User{ Name: "Alex", Email: "alex@example.com", Age: 25, } fmt.Println(user1) // Access fields with dot notation fmt.Println("Name:", user1.Name) fmt.Println("Email:", user1.Email) // Update a field user1.Age = 26 fmt.Println("New age:", user1.Age) } Output: ...

April 9, 2026 · 8 min

Go Tutorial #6: Arrays, Slices, and Maps

In the previous tutorial, you learned about control flow with if, switch, and for. Now it is time to learn about Go’s most important data structures: arrays, slices, and maps. Slices and maps are the collections you will use every day in Go. Arrays exist too, but you will almost always use slices instead. Arrays An array in Go has a fixed size. You set the size when you declare it, and it cannot change: ...

April 9, 2026 · 9 min

Go Tutorial #5: Control Flow — if, switch, for

In the previous tutorial, you learned about functions and error handling. Now it is time to learn how to control the flow of your program with if, switch, and for. Go keeps control flow simple. There is only one loop keyword: for. No while, no do-while. Just for. The switch statement is also simpler and more powerful than in most languages. if / else The basic if statement works like most languages. But Go does not need parentheses around the condition: ...

April 9, 2026 · 10 min

Go Tutorial #4: Functions and Error Handling

In the previous tutorial, you learned about variables, types, and constants. Now it is time to learn about functions. Functions are the building blocks of every Go program. Go functions have a unique feature: they can return multiple values. This is the foundation of Go’s error handling pattern. Basic Functions A function in Go starts with the func keyword: package main import "fmt" // A function that takes two ints and returns their sum func add(a int, b int) int { return a + b } // When parameters have the same type, you can shorten it func multiply(a, b int) int { return a * b } // A function with no return value func greet(name string) { fmt.Printf("Hello, %s!\n", name) } func main() { result := add(3, 4) fmt.Println("3 + 4 =", result) product := multiply(5, 6) fmt.Println("5 * 6 =", product) greet("Alex") } Output: ...

April 8, 2026 · 10 min

Go Tutorial #3: Variables, Types, and Constants

In the previous tutorial, you installed Go, set up VS Code, and wrote your first program. Now it is time to learn about variables, types, and constants. These are the building blocks of every Go program. Declaring Variables Go has two ways to declare variables: the var keyword and the short declaration :=. The var Keyword The var keyword declares a variable with an explicit type: package main import "fmt" func main() { var name string = "Alex" var age int = 25 var height float64 = 1.75 var isStudent bool = true fmt.Println(name, age, height, isStudent) } Output: ...

April 8, 2026 · 10 min