glide

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MPL-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package glide provides functions for working with the glide tool.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLockfile = errors.New("found glide.yaml but not glide.lock")

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

Functions

func UsedIn

func UsedIn(dirname string) (bool, error)

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

Types

type Import

type Import struct {
	Name        string
	Version     string
	Subpackages []string
	Repo        string
}

An Import is a single imported repository within a glide project.

type Lockfile

type Lockfile struct {
	Hash        string
	Updated     time.Time
	Imports     []Import
	TestImports []Import
	// contains filtered or unexported fields
}

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

func FromFile

func FromFile(filename string) (Lockfile, error)

FromFile reads a raw Lockfile from a glide.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, buildtools.ErrNoRevisionForPackage is returned. If the revision has an aliased location, that is returned in place of the existing name.

Jump to

Keyboard shortcuts

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