Documentation ¶
Index ¶
- type Module
- func (m Module) AllVersions() ([]*version.Version, error)
- func (m Module) GetVersionTreeId(v *version.Version) (string, error)
- func (m Module) HasVersion(v *version.Version) (bool, error)
- func (m Module) LatestVersion() (*version.Version, error)
- func (m Module) WriteVersionTar(v *version.Version, w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func Load ¶
Load creates a new Module object that reads its data from the given git repository directory.
This function returns nil if the given directory cannot be opened as a git repository for any reason.
func (Module) AllVersions ¶
AllVersions returns all of the available versions for the receiving module, in reverse order such that the latest version is at index 0.
The result may be an empty (or nil) slice if the underlying repository has no version-shaped tags.
func (Module) GetVersionTreeId ¶
func (Module) HasVersion ¶
HasVersion returns true if the receiving module has a tag for the given version number.
func (Module) LatestVersion ¶
LatestVersion returns the latest version available for the receiving module, or nil if it has no versions.
func (Module) WriteVersionTar ¶
WriteVersionTar recursively writes the contents of the git tree associated with the given version to the given writer. If no such version exists, or if there are any other problems when reading the tree, the resulting tar archive may be incomplete.