Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const MaxGoMod + const MaxLICENSE + const MaxZipFile + var ErrNoCommits error = noCommitsError + func AllHex(rev string) bool + func Run(dir string, cmdline ...any) ([]byte, error) + func RunWithStdin(dir string, stdin io.Reader, cmdline ...any) ([]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) + 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