Documentation ¶
Index ¶
- Constants
- Variables
- func CheckImports(absPath, importPath string, nod *Node) (importPkgs []string, err error)
- func CheckIsExistInGOPATH(importPath string) (string, bool)
- func CheckIsExistWithVCS(path string) bool
- func CheckNodeValue(v string) string
- func GetBestMatchGOPATH(appPath string) string
- func GetDirsInfo(rootPath string) ([]os.FileInfo, error)
- func GetProjectPath(importPath string) (projectPath string)
- func IsGoRepoPath(importPath string) bool
- func IsValidRemotePath(importPath string) bool
- func PureDownload(nod *Node, installRepoPath string, flags map[string]bool) ([]string, error)
- func SetAppConfig(path string, backup bool)
- func Synopsis(s string) string
- type Depend
- type Gopmfile
- type Node
- type Pkg
- type Section
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}
)
View Source
var (
Ops = []string{GreaterOrEq, LesserOrEq, Greater, Equeal, Lesser}
)
Functions ¶
func CheckImports ¶
checkImports checks package denpendencies.
func CheckIsExistInGOPATH ¶
CheckIsExistInGOPATH checks if given package import path exists in any path in GOPATH/src, and returns corresponding GOPATH.
func CheckIsExistWithVCS ¶
CheckIsExistWithVCS returns false if directory only has VCS folder, or doesn't exist.
func CheckNodeValue ¶
func GetBestMatchGOPATH ¶
GetGOPATH returns best matched GOPATH.
func GetDirsInfo ¶
GetDirsInfo returns os.FileInfo of all sub-directories in root path.
func GetProjectPath ¶
GetProjectPath returns project path of import path.
func IsGoRepoPath ¶
IsGoRepoPath returns true if package is from standard library.
func IsValidRemotePath ¶
IsValidRemotePath returns true if importPath is structurally valid for "go get".
func PureDownload ¶
PureDownload downloads package without version control.
func SetAppConfig ¶
Types ¶
type Gopmfile ¶
func NewGopmfile ¶
func NewGopmfile() *Gopmfile
type Pkg ¶
func NewDefaultPkg ¶
Click to show internal directories.
Click to hide internal directories.