storage

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package storage provides atomic file operations for JSON data in ~/.wt/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadJSON

func LoadJSON(path string, dest any) error

LoadJSON reads JSON from the specified path into dest. Returns os.ErrNotExist if file doesn't exist (caller should handle).

func SaveJSON

func SaveJSON(path string, data any) error

SaveJSON atomically writes data as JSON to the specified path. It ensures the parent directory exists, writes to a temp file, then renames to the final path for atomic operation.

func WtDir

func WtDir() (string, error)

WtDir returns the path to ~/.wt/, creating it if needed

Types

This section is empty.

Jump to

Keyboard shortcuts

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