govend: Index | Files

package manifest

import ""

Package manifest provides methods for the vendor manifest file.


Package Files

load.go manifest.go write.go

type Manifest Uses

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 Uses

func Load(format string) (*Manifest, error)

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 Uses

func (m *Manifest) Append(path, rev string, hold bool)

Append creates a vendor object from a path and revision and appends it to the Manifest.

func (Manifest) Contains Uses

func (m Manifest) Contains(pkg string) (Vendor, bool)

Contains returns true of the package import string is contained in the Manifest object

func (*Manifest) Filename Uses

func (m *Manifest) Filename() string

Filename returns the manifest filename including the format extension.

func (*Manifest) Len Uses

func (m *Manifest) Len() int

Len allows Manifest to satisfy the sort.Interface.

func (*Manifest) Less Uses

func (m *Manifest) Less(i, j int) bool

Less allows Manifest to satisfy the sort.Interface.

func (*Manifest) Remove Uses

func (m *Manifest) Remove(pkg string)

Remove takes a package import string, and removes it from the manifest file.

func (*Manifest) Swap Uses

func (m *Manifest) Swap(i, j int)

Swap allows Manifest to satisfy the sort.Interface.

func (*Manifest) Sync Uses

func (m *Manifest) Sync()

Sync removes orphaned vendored packages from the Manifest.

func (*Manifest) Write Uses

func (m *Manifest) Write() error

Write writes the vendors to the manifest file on disk.

type Vendor Uses

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.

Package manifest imports 12 packages (graph) and is imported by 12 packages. Updated 2020-10-01. Refresh now. Tools for package owners.