Documentation
¶
Index ¶
- func Dir() string
- func EnsureDir() error
- func FormatDiff(d model.Diff) string
- func Latest() (*model.Snapshot, error)
- func List() ([]string, error)
- func Load(path string) (*model.Snapshot, error)
- func LoadNotes() map[string]string
- func New(pkgs []model.Package) *model.Snapshot
- func Save(snap *model.Snapshot) (string, error)
- func SaveNotes(notes map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
func Dir() string
Dir returns the snapshot storage directory (~/.local/share/pkgtrack/snapshots/).
func EnsureDir ¶
func EnsureDir() error
EnsureDir creates the snapshot directory if it doesn't exist.
func FormatDiff ¶
FormatDiff returns a human-readable diff summary.
func LoadNotes ¶
LoadNotes reads user-defined descriptions from disk. Returns an empty map if the file doesn't exist.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.