Documentation
¶
Index ¶
- Constants
- Variables
- type Snapshot
- type Store
- func (s *Store) Back(num int, force bool) error
- func (s *Store) Changes(versions ...int) (string, error)
- func (s *Store) Delete() error
- func (s *Store) Exists() bool
- func (s *Store) GetLatestVersion() (int, error)
- func (s *Store) History() ([]Snapshot, error)
- func (s *Store) Initialize() error
- func (s *Store) Now() (current int, latest int, hasChanges bool, err error)
- func (s *Store) OopsDirPath() string
- func (s *Store) Save(message string) (*Snapshot, error)
- func (s *Store) ShouldCompress() bool
- func (s *Store) Undo() error
Constants ¶
View Source
const (
OopsDir = ".oops"
)
Variables ¶
View Source
var ( ErrNotTracked = errors.New("file is not tracked") ErrAlreadyTracked = errors.New("file is already tracked") ErrNoChanges = errors.New("no changes to save") ErrVersionNotFound = errors.New("version not found") ErrUncommittedChanges = errors.New("uncommitted changes exist") ErrGitNotInstalled = errors.New("git is not installed") )
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store manages versioning for a single file using Git backend
func (*Store) GetLatestVersion ¶
GetLatestVersion returns the latest version number
func (*Store) Initialize ¶
Initialize creates a new store for tracking (start/track)
func (*Store) OopsDirPath ¶
OopsDirPath returns the path to .oops directory
func (*Store) ShouldCompress ¶
ShouldCompress checks if the tracked file should be compressed
Click to show internal directories.
Click to hide internal directories.