Repository navigation
v0.3.0 — WriteFunc Streaming API
What's New
WriteFunc — streaming atomic writes
A new public API for writing large or incrementally-produced content without holding the full payload in memory:
err := atomicwrite.WriteFunc(path, func(w io.Writer) error {
enc := json.NewEncoder(w)
return enc.Encode(largeObject)
}, fp)The callback receives a bufio.Writer (64KB buffer). The temp file is fsync'd before atomic rename, and TOCTOU fingerprint verification works identically to Write.
Other changes
- Benchmark data generation extracted into a shared
benchDatahelper .gitattributesfor cross-platform line-ending normalization- Marketing website launched at atomicwrite.lars.software
Full changelog: CHANGELOG.md