doc

package
v0.1.1-0...-5c19607 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2013 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Greater     = ">"
	GreaterOrEq = ">="
	Equeal      = "="
	Lesser      = "<"
	LesserOrEq  = "<="
)
View Source
const (
	TRUNK   = "trunk"
	MASTER  = "master"
	DEFAULT = "default"
	TAG     = "tag"
	BRANCH  = "branch"
	COMMIT  = "commit"
)
View Source
const (
	GopmFileName = ".gopmfile"
)

Variables

View Source
var (
	HttpClient = &http.Client{Transport: httpTransport}
)

Functions

func CheckImports

func CheckImports(absPath, importPath string, nod *Node) (importPkgs []string, err error)

checkImports checks package denpendencies.

func CheckIsExistInGOPATH

func CheckIsExistInGOPATH(importPath string) (string, bool)

CheckIsExistInGOPATH checks if given package import path exists in any path in GOPATH/src, and returns corresponding GOPATH.

func CheckIsExistWithVCS

func CheckIsExistWithVCS(path string) bool

CheckIsExistWithVCS returns false if directory only has VCS folder, or doesn't exist.

func CheckNodeValue

func CheckNodeValue(v string) string

func GetBestMatchGOPATH

func GetBestMatchGOPATH(appPath string) string

GetGOPATH returns best matched GOPATH.

func GetDirsInfo

func GetDirsInfo(rootPath string) ([]os.FileInfo, error)

GetDirsInfo returns os.FileInfo of all sub-directories in root path.

func GetProjectPath

func GetProjectPath(importPath string) (projectPath string)

GetProjectPath returns project path of import path.

func IsGoRepoPath

func IsGoRepoPath(importPath string) bool

IsGoRepoPath returns true if package is from standard library.

func IsValidRemotePath

func IsValidRemotePath(importPath string) bool

IsValidRemotePath returns true if importPath is structurally valid for "go get".

func PureDownload

func PureDownload(nod *Node, installRepoPath string, flags map[string]bool) ([]string, error)

PureDownload downloads package without version control.

func SetAppConfig

func SetAppConfig(path string, backup bool)

func Synopsis

func Synopsis(s string) string

Synopsis extracts the first sentence from s. All runs of whitespace are replaced by a single space.

Types

type Depend

type Depend struct {
	Pkg *Pkg
	Op  string
	Ver string
}

type Gopmfile

type Gopmfile struct {
	Sections map[string]*Section
}

func NewGopmfile

func NewGopmfile() *Gopmfile

func (*Gopmfile) Load

func (this *Gopmfile) Load(path string) error

func (*Gopmfile) Save

func (this *Gopmfile) Save(path string) error

type Node

type Node struct {
	Pkg
	DownloadURL string
	Synopsis    string
	IsGetDeps   bool
}

func NewNode

func NewNode(importPath, downloadUrl, tp, value string, isGetDeps bool) *Node

type Pkg

type Pkg struct {
	ImportPath string
	Type       string
	Value      string // Branch, tag or commit.
}

func NewDefaultPkg

func NewDefaultPkg(importPath string) *Pkg

func NewPkg

func NewPkg(importPath, tp, value string) *Pkg

func (*Pkg) VerString

func (pkg *Pkg) VerString() string

type Section

type Section struct {
	Name  string
	Deps  map[string]*Depend
	Props map[string]string
}

func NewSection

func NewSection() *Section

Jump to

Keyboard shortcuts

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