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…1d ago1d ago
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
Phuong Le (@func25)inLevel Up CodingGo EP8: Handle errors while using defer to prevent silent failuresThere’s a subtle trap that many fall into: forgetting to check for errors in deferred calls.Apr 41Apr 41
Phuong Le (@func25)inLevel Up CodingGo EP7: Goroutines Are StackfulEach time we launch a goroutine with go doSomething(), we’re immediately reserving 2KB of memory (this was 4KB in Go 1.2 and increased to…Mar 281Mar 281
Phuong Le (@func25)inLevel Up CodingGo EP6: Keep contexts going with context.WithoutCancel()Everything from how to better control context to how to handle errors in a way that makes our apps work better and last longer.Mar 22Mar 22