dep: Index | Files

package base

import ""


Package Files


type ImportedPackage Uses

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 Uses

type Importer struct {
    SourceManager gps.SourceManager
    Logger        *log.Logger
    Verbose       bool
    Manifest      *dep.Manifest
    Lock          *dep.Lock

Importer provides a common implementation for importing from other dependency managers.

func NewImporter Uses

func NewImporter(logger *log.Logger, verbose bool, sm gps.SourceManager) *Importer

NewImporter creates a new Importer for embedding in an importer.

func (*Importer) ImportPackages Uses

func (i *Importer) ImportPackages(packages []ImportedPackage, defaultConstraintFromLock bool)

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.

Package base imports 6 packages (graph) and is imported by 70 packages. Updated 2018-03-01. Refresh now. Tools for package owners.