pkgspec

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: BSD-3-Clause Imports: 4 Imported by: 164

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
	FilePath    string
	Origin      string
	IncludeTree bool
	MatchTree   bool
	HasVersion  bool
	HasOrigin   bool
	Version     string

	Uncommitted bool
}

func Parse

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

Parse a package spec according to: package-spec = <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