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 GetAllImports(dirs []string, importPath string, example bool) (imports []string)
- func GetBestMatchGOPATH(appPath string) string
- func GetDirsInfo(rootPath string) []os.FileInfo
- func GetImports(absPath, importPath string, example bool) []string
- func GetPkgFullPath(short string) string
- func GetProjectPath(importPath string) (projectPath string)
- func IsGoRepoPath(importPath string) bool
- func IsValidRemotePath(importPath string) bool
- func LoadLocalNodes()
- func LoadPkgNameList(filePath string)
- func NewGopmfile(dirPath string) *goconfig.ConfigFile
- func PureDownload(nod *Node, installRepoPath string, ctx *cli.Context) ([]string, error)
- func SaveLocalNodes()
- func SetAppConfig(path string, backup bool)
- func Synopsis(s string) string
- type Node
- type Pkg
Constants ¶
const ( GOPM_FILE_NAME = ".gopmfile" RawHomeDir = "~/.gopm" )
const ( TRUNK = "trunk" MASTER = "master" DEFAULT = "default" TAG = "tag" BRANCH = "branch" COMMIT = "commit" LOCAL = "local" )
const VENDOR = ".vendor"
Variables ¶
var ( HomeDir = "~/.gopm" LocalNodesFile = "/data/localnodes.list" LocalNodes *goconfig.ConfigFile )
var (
HttpClient = &http.Client{Transport: httpTransport}
)
var PackageNameList map[string]string
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 GetAllImports ¶
func GetBestMatchGOPATH ¶
GetGOPATH returns best matched GOPATH.
func GetDirsInfo ¶
GetDirsInfo returns os.FileInfo of all sub-directories in root path.
func GetImports ¶
GetImports returns package denpendencies.
func GetPkgFullPath ¶
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 LoadLocalNodes ¶
func LoadLocalNodes()
func LoadPkgNameList ¶
func LoadPkgNameList(filePath string)
func NewGopmfile ¶
func NewGopmfile(dirPath string) *goconfig.ConfigFile
NewGopmfile loads gopmgile in given directory.
func PureDownload ¶
PureDownload downloads package without version control.
func SaveLocalNodes ¶
func SaveLocalNodes()