vendorfile

package
v0.0.0-...-1c9b6a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package vendorfile is the meta-data file for vendoring. Round-trips unknown fields. It will also allow moving the vendor file to new locations.

Index

Constants

View Source
const Name = "vendor.json"

Name of the vendor file.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	RootPath string // Import path of vendor folder

	Comment string

	Ignore string

	Package []*Package
	// contains filtered or unexported fields
}

File is the structure of the vendor file.

func (*File) Marshal

func (vf *File) Marshal(w io.Writer) error

Marshal the vendor file to the specified writer. Retains read fields.

func (*File) Unmarshal

func (vf *File) Unmarshal(r io.Reader) error

Unmarshal the vendor file from the specified reader. Stores internally all fields.

type Package

type Package struct {

	// If delete is set to true the package will not be written to the vendor file.
	Remove bool

	// If new is set to true the package will be treated as a new package to the file.
	Add bool

	// See the vendor spec for definitions.
	Origin       string
	Path         string
	Tree         bool
	Revision     string
	RevisionTime string
	Version      string
	VersionExact string
	ChecksumSHA1 string
	Comment      string
	// contains filtered or unexported fields
}

Package represents each package.

func (*Package) PathOrigin

func (pkg *Package) PathOrigin() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL