#Go

35 posts

Go Intermediate #3 Goroutines and Channels Intro
7 min read

Go Intermediate #3 Goroutines and Channels Intro

Go's biggest strength — lightweight concurrency. Starting goroutines and communicating via channels, plus the gotchas you'll meet.

Go Intermediate #2 Error-Handling Patterns
8 min read

Go Intermediate #2 Error-Handling Patterns

Error wrapping (%w), errors.Is and errors.As, custom error types, and where panic fits.

Go Intermediate #1 Interfaces — the Meaning of Implicit Implementation
7 min read

Go Intermediate #1 Interfaces — the Meaning of Implicit Implementation

Go interfaces' headline feature — implicit implementation, the small-interface guide, and the empty interface with type assertions and type switch.

Go Basics #7 Packages and Modules (go mod)
7 min read

Go Basics #7 Packages and Modules (go mod)

Go's code organization — splitting by package, importing external packages, and everything about managing dependencies with go mod.

Go Basics #6 Structs and Methods
7 min read

Go Basics #6 Structs and Methods

Defining user types with struct and attaching methods, value vs pointer receivers, and the embedding pattern.

Go Basics #5 Collections — array, slice, map
7 min read

Go Basics #5 Collections — array, slice, map

Go's three collections — fixed-length array, growable slice, key-value map. How they work and the gotchas you'll meet.

Go Basics #4 Functions, Multiple Return, error Type
7 min read

Go Basics #4 Functions, Multiple Return, error Type

The various forms of function definition, Go's signature multiple-return pattern, and the error type with the if err != nil idiom you'll meet most.

Go Basics #3 Control Flow — if, for, switch
3 min read

Go Basics #3 Control Flow — if, for, switch

Branching and looping in Go — if with short statements, for as the only loop, switch with no implicit fallthrough.

Go Basics #2 Variables, Types, Constants
3 min read

Go Basics #2 Variables, Types, Constants

Go's basic types, two ways to declare variables, and the const and iota patterns.

Go Basics #1 Getting Started and Your First Program
6 min read

Go Basics #1 Getting Started and Your First Program

Why Go, setting it up, and compiling and running your first program — the starting line of the Go track.

Go GORM 1:N (One To Many) relationship modeling and queries
4 min read

Go GORM 1:N (One To Many) relationship modeling and queries

In this post we'll cover how to model a one-to-many relationship and how to query it using GORM.