Skip to main content
bash TV

Pointer vs Value Receivers in Go: Nobody Explains Why!

Flo Woelki

803 views6 Nov 2026

YouTube

Understanding the difference between pointer and value receiver methods in Go is a must! If you would like to have a quick crash course of Go, check out this video: https://youtu.be/P7dCWOjRwJA 📝 Description Master Go's value vs. pointer receivers in this short tutorial. You'll see how each one behaves, how methods work under the hood, and the two mistakes that trip up most beginners. Here's what you will learn: • Understand the difference between value and pointer receivers: a value receiver works on a copy, while a pointer receiver modifies the original. • See how receiver methods are just regular functions with a special first argument. • Avoid mistake #1: storing a plain struct in an interface when its methods use pointer receivers, which fails to compile because of method sets. • Avoid mistake #2: calling pointer receiver methods on struct values stored in a map, which fails because map elements aren't addressable. • Apply a simple rule of thumb for choosing between the two, including why you should keep receivers consistent across a type. ⏳ Timestamps: 00:00 - Introduction 00:14 - Explanation 08:24 - Outro 👋 Hey there! If you are new to this channel: Hey 👋 my name is Flo and I am a professional software engineer with a passion for coding in Golang, TypeScript, JavaScript, and Rust. This channel is where I share that passion and dive into the exciting world of software engineering. 📨 Support and Connect! Become a member. https://www.youtube.com/@FloWoelki/membership Discord: https://discord.gg/TnA7drJ X / Twitter: https://x.com/FlorianWoelki LinkedIn: https://www.linkedin.com/in/florian-woelki/ GitHub: https://github.com/FlorianWoelki 📝 Copyright Notice The original Go Gopher was designed by Renée French (Source: https://go.dev/blog/gopher License details: https://creativecommons.org/licenses/by/4.0/). The gopher appearing in this video and thumbnail has been modified from the original design and is based on an illustration from Maria Letta's free-gophers-pack (Source: https://github.com/MariaLetta/free-gophers-pack License: CC0 1.0 Public Domain https://creativecommons.org/publicdomain/zero/1.0/). #go #pointer #value #methods

Join the discussion

Have something to add?

Sign in to reply, follow this thread, and earn XP when your answer helps someone.