Versions in this module Expand all Collapse all v0 v0.0.8 Feb 24, 2021 Changes in this version + const MaxGoMod + const MaxLICENSE + const MaxZipFile + var ErrNoCommits error = noCommitsError + func AllHex(rev string) bool + func Run(dir string, cmdline ...interface{}) ([]byte, error) + func RunWithStdin(dir string, stdin io.Reader, cmdline ...interface{}) ([]byte, error) + func ShortenSHA1(rev string) string + func WorkDir(typ, name string) (dir, lockfile string, err error) + type FileRev struct + Data []byte + Err error + Rev string + type Repo interface + DescendsFrom func(rev, tag string) (bool, error) + Latest func() (*RevInfo, error) + ReadFile func(rev, file string, maxSize int64) (data []byte, err error) + ReadFileRevs func(revs []string, file string, maxSize int64) (files map[string]*FileRev, err error) + ReadZip func(rev, subdir string, maxSize int64) (zip io.ReadCloser, err error) + RecentTag func(rev, prefix string, allowed func(string) bool) (tag string, err error) + Stat func(rev string) (*RevInfo, error) + Tags func(prefix string) (tags []string, err error) + func LocalGitRepo(remote string) (Repo, error) + func NewRepo(vcs, remote string) (Repo, error) + type RevInfo struct + Name string + Short string + Tags []string + Time time.Time + Version string + type RunError struct + Cmd string + Err error + HelpText string + Stderr []byte + func (e *RunError) Error() string + type UnknownRevisionError struct + Rev string + func (UnknownRevisionError) Is(err error) bool + func (e *UnknownRevisionError) Error() string + type VCSError struct + Err error + func (e *VCSError) Error() string