Tagged articles
3 articles
Page 1 of 1
MaGe Linux Operations
MaGe Linux Operations
Aug 6, 2024 · Backend Development

How Go 1.16’s Directory Traversal Optimization Boosts Performance by 480%

This article explains the directory‑traversal optimization introduced in Go 1.16, shows benchmark results where the new APIs (os.ReadDir, (*os.File).ReadDir, filepath.WalkDir) run up to 4.8 times faster than the old approach, and details the underlying mechanism that reduces system calls by leveraging file‑system‑provided metadata.

directory traversalgo1.16
0 likes · 13 min read
How Go 1.16’s Directory Traversal Optimization Boosts Performance by 480%
Go Programming World
Go Programming World
Jul 14, 2024 · Backend Development

Embedding Static Resources in Go with //go:embed

Since Go 1.16, the //go:embed directive allows developers to embed files, directories, or entire static assets directly into the compiled binary, simplifying deployment; this article explains the directive, its three embedding methods, usage in HTTP servers, unit tests, handling parent directories, and important considerations.

HTTP serverembedgo1.16
0 likes · 24 min read
Embedding Static Resources in Go with //go:embed