storage

package
v1.0.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package storage provides filesystem utilities for safe, atomic persistence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteAtomic

func WriteAtomic(path string, perm os.FileMode, write func(w io.Writer) error) error

WriteAtomic writes to path atomically: creates a .tmp sibling, calls write with the temporary file, syncs the file to disk, then renames over path. If write returns an error or any step fails, the .tmp file is removed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL