atomicfile

package
v0.293.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package atomicfile writes a whole file so that no reader ever sees half of it: a temp file unique to this write, in the same directory, 0600 from creation, synced, then renamed into place. Concurrent writers never interleave — the file is always one whole write, the last one's.

The ONE such writer muster-mirror has: the hook config (`muster-mirror ask`'s record) goes through it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(path string, b []byte) error

Write replaces path with b, mode 0600.

Types

This section is empty.

Jump to

Keyboard shortcuts

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