package
Version:
v0.0.0-...-9d29f1b
Opens a new window with list of versions in this module.
Published: Sep 4, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package jsondb provides a trivial "database": a Go object saved to
disk as JSON.
type DB[T any] struct {
Data *T
}
DB is a database backed by a JSON file.
Open opens the database at path, creating it with a zero value if
necessary.
Save writes db.Data back to disk.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.