package
module
Version:
v0.0.0-...-2b48a8c
Opens a new window with list of versions in this module.
Published: Mar 10, 2024
License: MIT
Opens a new window with license information.
Imports: 7
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.