history¶
Package history tracks recently used repositories so the interactive repo picker can sort them by recency. The history is stored as JSON in \~/.config/codespace-zed/history.json.
Index¶
- type Entry
- type History
- func Load() *History
- func LoadFrom(path string) *History
- func (h *History) Save() error
- func (h *History) SaveTo(path string) error
- func (h *History) SortRepos(repos []string) []string
- func (h *History) Touch(repo string)
type Entry¶
Entry records a single repo usage.
type History¶
History tracks recently used repositories.
func Load¶
Load reads the history file. Returns empty history if missing.
func LoadFrom¶
LoadFrom reads history from a specific path.
func (*History) Save¶
Save writes the history file.
func (*History) SaveTo¶
SaveTo writes history to a specific path.
func (*History) SortRepos¶
SortRepos reorders repos by recency. Repos not in history go to the end, preserving their original order.
func (*History) Touch¶
Touch records a repository as just used.
Generated by gomarkdoc