storage

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package storage provides common storage utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(dataDir, name string, v json.Unmarshaler) error

Load reads a JSON snapshot from dataDir/{name}.json and unmarshals it into v. Returns nil if the file does not exist.

func Save

func Save(dataDir, name string, v json.Marshaler) error

Save marshals v to JSON and writes it atomically to dataDir/{name}.json.

Types

This section is empty.

Jump to

Keyboard shortcuts

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