Phuong Le (@func25)inLevel Up CodingGo sync.Cond, the Most Overlooked Sync Mechanismsync.Cond is a synchronization primitive, though it’s not as commonly used as its siblings like sync.Mutex or sync.WaitGroup. You’ll rarely…5d ago5d ago
Phuong Le (@func25)inLevel Up CodingGo sync.WaitGroup and The Alignment ProblemWaitGroup is basically a way to wait for several goroutines to finish their work. We’ll start with the basics and then dig into how it’s…Oct 21Oct 21
Phuong Le (@func25)Slices in Go: Grow Big or Go HomeSlices are way more flexible than arrays since they’re basically a layer on top of an array. They can “resize” dynamically, and you can use…Oct 51Oct 51
Phuong Le (@func25)inLevel Up CodingGo sync.Pool and the Mechanics Behind ItInstead of just throwing these objects after each use, which would only give the garbage collector more work, we stash them in a pool. The…Sep 17Sep 17
Phuong Le (@func25)inLevel Up CodingGo Maps Explained: How Key-Value Pairs Are Actually StoredHave you ever set a ‘hint’ for a map and wondered why it’s called a ‘hint’ and not something simple like length, like we do with slices?Sep 8Sep 8
Phuong Le (@func25)inLevel Up CodingGo Sync Mutex: Normal and Starvation ModeWhen a goroutine locks a mutex, it’s basically saying, ‘Hey, I’m going to use this shared resource for a bit,’ and every other goroutine…Sep 4Sep 4
Phuong Le (@func25)inLevel Up CodingHow Go Arrays Work and Get Tricky with For-RangeThe classic Golang array and slice are pretty straightforward. But I’ve got to tell you, Go might seem simple on the surface, but it’s got…Aug 20Aug 20
Phuong Le (@func25)Golang Defer: Heap-allocated Defer, Stack-allocated Defer and Open-coded DeferThe defer statement actually has 3 types: open-coded defer, heap-allocated defer, and stack-allocated.Aug 7Aug 7
Phuong Le (@func25)inLevel Up CodingVendoring, or go mod vendor: What Is It?Now, vendoring is a different strategy as it keeps a copy of all your project’s dependencies directly within the project’s directory…Jul 232Jul 232
Phuong Le (@func25)inLevel Up CodingGO EP12: Go.mod File — What You Need to KnowThere are several directives we will talk about, including: module, go, require, exclude, replace, retract, and a new one, toolchain."Jun 253Jun 253