Documentation ¶
Index ¶
- type Git
- func (g *Git) Checkout(reference *plumbing.Reference) (*git.Worktree, error)
- func (g *Git) Filepaths() ([]string, error)
- func (g *Git) Latest() (*plumbing.Reference, error)
- func (g *Git) Releases() ([]*plumbing.Reference, error)
- func (g *Git) Source(path string) ([]byte, error)
- func (g *Git) Walk(fn filepath.WalkFunc) error
- type GitError
- type GitErrorMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func Github ¶
Github clones remote specified by the provided organization and repository names as "origin" without checking out a working tree (for performance reasons).
func Repository ¶
Repository clones remote specified by the provided URL as "origin" without checking out a working tree (for performance reasons).
func (*Git) Checkout ¶
Checkout retrieves the working tree for the specified reference from the specified repository.
func (*Git) Filepaths ¶
Filepaths walks the worktree's filesystem hierarchy and returns a slice of FileInfo values for all the elements encountered.
func (*Git) Latest ¶
Latest returns the reference to the latest tag matching the semver criteria without a prerelease suffix (highest, major, minor, bug values ignoring the build number suffix if present).
func (*Git) Releases ¶
Releases returns the list of tags that match the semantic versioning criteria and do not include a prerelease suffix.
type GitErrorMsg ¶
type GitErrorMsg string
const ( CheckoutFailed GitErrorMsg = "failed to checkout the requested worktree" CloneFailed GitErrorMsg = "failed to clone the repository" GetTagsFailed GitErrorMsg = "failed to retrieve repository tags" NoReleaseTag GitErrorMsg = "repository has no release tags matching semver" SourceReadFailed GitErrorMsg = "failed to read source file" WorktreeWalkFailed GitErrorMsg = "error walking the worktree" )
func (GitErrorMsg) Error ¶
func (e GitErrorMsg) Error() string
func (GitErrorMsg) Wrap ¶
func (e GitErrorMsg) Wrap(cause error) GitError