fileutil

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWriteJSON

func AtomicWriteJSON(filePath string, data any, perm os.FileMode) error

AtomicWriteJSON writes data as JSON to filePath atomically using temp+rename. This prevents partial/corrupt files from concurrent reads during write. The file is fsync'd before rename to ensure durability.

Types

This section is empty.

Jump to

Keyboard shortcuts

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