Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImportedPackage ¶
type ImportedPackage struct { // Required. The package path, not necessarily the project root. Name string // Required. Text representing a revision or tag. LockHint string // Optional. Alternative source, or fork, for the project. Source string // Optional. Text representing a branch or version. ConstraintHint string }
ImportedPackage is a common intermediate representation of a package imported from an external tool's configuration.
type Importer ¶
type Importer struct { Logger *log.Logger Verbose bool Manifest *dep.Manifest Lock *dep.Lock // contains filtered or unexported fields }
Importer provides a common implementation for importing from other dependency managers.
func NewImporter ¶
NewImporter creates a new Importer for embedding in an importer.
func (*Importer) ImportPackages ¶
func (i *Importer) ImportPackages(packages []ImportedPackage, defaultConstraintFromLock bool) (err error)
ImportPackages loads imported packages into the manifest and lock.
- defaultConstraintFromLock specifies if a constraint should be defaulted based on the locked version when there wasn't a constraint hint.
Rules: * When a constraint is ignored, default to *. * HEAD revisions default to the matching branch. * Semantic versions default to ^VERSION. * Revision constraints are ignored. * Versions that don't satisfy the constraint, drop the constraint. * Untagged revisions ignore non-branch constraint hints.