doc

package
v0.1.1-0...-35e6f39 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2013 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOPM_FILE_NAME = ".gopmfile"
	RawHomeDir     = "~/.gopm"
)
View Source
const (
	TRUNK   = "trunk"
	MASTER  = "master"
	DEFAULT = "default"
	TAG     = "tag"
	BRANCH  = "branch"
	COMMIT  = "commit"
	LOCAL   = "local"
)
View Source
const VENDOR = ".vendor"

Variables

View Source
var (
	HomeDir        = "~/.gopm"
	LocalNodesFile = "/data/localnodes.list"
	LocalNodes     *goconfig.ConfigFile
)
View Source
var (
	HttpClient = &http.Client{Transport: httpTransport}
)
View Source
var PackageNameList map[string]string

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 GetAllImports

func GetAllImports(dirs []string, importPath string, example bool) (imports []string)

func GetBestMatchGOPATH

func GetBestMatchGOPATH(appPath string) string

GetGOPATH returns best matched GOPATH.

func GetDirsInfo

func GetDirsInfo(rootPath string) []os.FileInfo

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

func GetImports

func GetImports(absPath, importPath string, example bool) []string

GetImports returns package denpendencies.

func GetPkgFullPath

func GetPkgFullPath(short string) string

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 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

func PureDownload(nod *Node, installRepoPath string, ctx *cli.Context) ([]string, error)

PureDownload downloads package without version control.

func SaveLocalNodes

func SaveLocalNodes()

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 Node

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

func NewNode

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

type Pkg

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

func NewDefaultPkg

func NewDefaultPkg(importPath string) *Pkg

func NewPkg

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

func (*Pkg) VerString

func (pkg *Pkg) VerString() string

Jump to

Keyboard shortcuts

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