statefile

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 6 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 statefile reads and writes the small private JSON files the tool keeps in its state directory: API token hashes and webhook secrets. A file is written atomically (a temporary file renamed over it) with mode 0600, in a directory with mode 0700, and a file another user can read is refused on load rather than trusted.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path string, v any) (bool, error)

Load decodes path into v. A missing file leaves v alone and reports false.

func Save

func Save(path string, v any) error

Save encodes v into path, atomically, 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