dep

package
v0.7.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dep provides functions for working with the dep tool.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLockfile = errors.New("found Gopkg.toml but not Gopkg.lock")

ErrNoLockfile is returned if a dep manifest is found without an accompanying lockfile.

Functions

func UsedIn

func UsedIn(dirname string) (bool, error)

UsedIn checks whether dep is used correctly within a project folder.

Types

type Lockfile

type Lockfile struct {
	Projects []Project
	// contains filtered or unexported fields
}

A Lockfile contains the contents of a dep lockfile. Lockfiles are resolvers.

func FromFile

func FromFile(filename string) (Lockfile, error)

FromFile reads a raw Lockfile from a Gopkg.lock file.

func New

func New(dirname string) (Lockfile, error)

New constructs a golang.Resolver

func (Lockfile) Resolve

func (l Lockfile) Resolve(importpath string) (pkg.Import, error)

Resolve returns the revision of an imported Go package contained within the lockfile. If the package is not found, errutil.ErrNoRevisionForPackage is returned.

type Project

type Project struct {
	Name     string
	Packages []string
	Revision string
	Version  string
}

A Project is a single imported repository within a dep project.

Jump to

Keyboard shortcuts

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