Documentation
¶
Index ¶
- Variables
- func Dependents(dir, p string) ([]string, error)
- func DependentsPrefix(dir, relPath string) ([]string, error)
- func ExtImports(dir string) ([]string, error)
- func GOPATH(pkg *build.Package) string
- func GithubPath(p string) (string, error)
- func GoGetAndInstall(src, pkgPath string) error
- func GoPkginPath(p string, version [3]int) (string, error)
- func GoPkginVersion(path string) (version [3]int, err error)
- func Imports(dir string) ([]string, error)
- func InGoPkgin(path string) bool
- func LastVersion(versions ...string) ([3]int, error)
- func Pkg(dir string) (*build.Package, error)
- func PkgPath(pkg *build.Package) (string, error)
- func PushNewMajor(dir string) ([3]int, error)
- func PushNewMinor(dir string) ([3]int, error)
- func PushNewPatch(dir string) ([3]int, error)
- func ReplaceImport(pkgDir, original, target string) (err error)
- func ReplaceWithGithubPath(pkgDir string) error
- func ReplaceWithGopkginPath(pkgdir string, version [3]int) error
- func SetNewMajor(dir string) ([3]int, error)
- func SetNewMinor(dir string) ([3]int, error)
- func SetNewPatch(dir string) ([3]int, error)
- func StdImports(dir string) ([]string, error)
- func VersionString(version [3]int) string
Constants ¶
This section is empty.
Variables ¶
var DEBUG bool
var ErrInvalidGithubPath = errors.New("invalid github path")
var ErrInvalidGoPkginPath = errors.New("invalid gopkg.in path")
var ErrInvalidGoPkginVersion = errors.New("invalid gopkg.in version string")
var ErrNoGoPkginPath = errors.New("no gopkg.in path")
Functions ¶
func Dependents ¶
Dependents returns packages inside the given dir that are dependent of the given package, because they import it does not look into directories that begin with the dot
func DependentsPrefix ¶
DependentsPrefix is like DependentsPrefix, but relPath is a package path, not a directory
func ExtImports ¶
ExtImports returns the imports of a package that are not part of the standard library
func GithubPath ¶
GithubPath returns the github path for the gopkg.in path
func GoGetAndInstall ¶
func GoPkginPath ¶
GoPkginPath returns the versioned gopkg.in path for a package
func GoPkginVersion ¶
GoPkginVersion parses major minor and patch version out of a gopkg.in package string
func LastVersion ¶
LastVersion returns the last version of a version slice like this []string{"v1","v5", "v1.10"}
func PushNewMajor ¶
func PushNewMinor ¶
func PushNewPatch ¶
func ReplaceImport ¶ added in v1.1.1
func ReplaceWithGithubPath ¶
ReplaceWithGithubPath takes a pkg pkgDir that is a GithubPath. It replaces inside every file inside every package beneath the given dir an string that references any gopkg variant of the given package by the github variant It can be used for developement to be able to run the tests, switch back by calling ReplaceWithGopkginPath
func ReplaceWithGopkginPath ¶
ReplaceWithGithubPath takes a pkg pkgDir that is a GithubPath. It replaces inside every file inside every package beneath the given dir an string that references any github or gopkgin variant of the given package by the gopkg variant with the given version. It can be used to release a package after ReplaceWithGithubPath has been used or to update a version number
func SetNewMajor ¶
func SetNewMinor ¶
func SetNewPatch ¶
func StdImports ¶
StdImports returns the imports of a package that are part of the standard library
func VersionString ¶
VersionString returns something like v2.4 for [3]int{2,4,0}
Types ¶
This section is empty.