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
Phuong Le (@func25)inLevel Up CodingGO EP11: Go Commands - go get, go mod tidy, etcThe go.mod file, or go module, is basically a way to organize and manage a bunch of Go packages together.Jun 171Jun 171
Phuong Le (@func25)inLevel Up CodingGo EP10: GOROOT, GOPATH, GOCACHEFor instance, you might wonder what `GOPATH` and `GOROOT` mean, or what happens when you use commands like `go get` or `go mod tidy`.Jun 41Jun 41
Phuong Le (@func25)inLevel Up CodingGo EP9: How to Gracefully Shut Down Your ApplicationWhen we talk about gracefully shutting down an application, there are a few key guarantees we aim to achieve:Apr 141Apr 141