VictoriaMetrics Observability Blog

Filter: Phuong Le

Golang Defer: From Basic To Traps

The defer statement actually has 3 types: open-coded defer, heap-allocated defer, and stack-allocated. Each one has different performance and different scenarios where they’re best used, which is good to know if you want to optimize performance.

Vendoring, or go mod vendor: What Is It?

Vendoring is a different strategy as it keeps a copy of all your project’s dependencies directly within the project’s directory, rather than relying on an external cache.