Documentation ¶
Overview ¶
Package manifest provides methods for the vendor manifest file.
Index ¶
- type Manifest
- func (m *Manifest) Append(path, rev string, hold bool)
- func (m Manifest) Contains(pkg string) (Vendor, bool)
- func (m *Manifest) Filename() string
- func (m *Manifest) Len() int
- func (m *Manifest) Less(i, j int) bool
- func (m *Manifest) Remove(pkg string)
- func (m *Manifest) Swap(i, j int)
- func (m *Manifest) Sync()
- func (m *Manifest) Write() error
- type Vendor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
type Manifest struct { Vendors []Vendor `json:"vendors" yml:"vendors" toml:"vendors"` // contains filtered or unexported fields }
Manifest describes the manifest file used save repository dependencies and their corresponding revision hashes.
The file is written as JSON, YAML or TOML.
func Load ¶
Load reads a vendor manifest file and returns a Manifest object. It also takes an optional format to default the manifest to when written.
func (*Manifest) Append ¶
Append creates a vendor object from a path and revision and appends it to the Manifest.
func (Manifest) Contains ¶
Contains returns true of the package import string is contained in the Manifest object
func (*Manifest) Remove ¶
Remove takes a package import string, and removes it from the manifest file.
type Vendor ¶
type Vendor struct { Path string `json:"path" yaml:"path" toml:"path"` Rev string `json:"rev,omitempty" yaml:"rev,omitempty" toml:"rev,omitempty"` Hold bool `json:"hold,omitempty" yaml:"hold,omitempty" toml:"hold,omitempty"` }
Vendor describes a repository with its import path and revision hash.