pkgspec

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package pkgspec defines a schema that contains the path, origin, version and other properties.

package pkgspec parses the package specification string

Index

Constants

View Source
const (
	TreeIncludeSuffix = "/^"
	TreeMatchSuffix   = "/..."
)

Variables

View Source
var (
	ErrEmptyPath   = errors.New("Empty package path")
	ErrEmptyOrigin = errors.New("Empty origin specified")
	ErrInvalidPath = errors.New("Path contains a vendor folder and a origin")
)

Functions

This section is empty.

Types

type Pkg

type Pkg struct {
	Path        string
	Origin      string
	IncludeTree bool
	MatchTree   bool
	HasVersion  bool
	Version     string

	Uncommitted bool
}

func Parse

func Parse(currentGoPath, s string) (*Pkg, error)

Parse a package spec according to: package-sepc = <path>[{/...|/^}][::<origin>][@[<version-spec>]]

func (*Pkg) PathOrigin

func (pkg *Pkg) PathOrigin() string

func (*Pkg) String

func (pkg *Pkg) String() string

Jump to

Keyboard shortcuts

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