Documentation
¶
Index ¶
- Variables
- func EnsureBranchInPackage(pkg string, branchName string) error
- func EnsureBranchInPackageCmd(pkg string, branchName string) magelib.Cmd
- func EnsurePackageInstalledCmd(appName string, packageName string) magelib.Cmd
- func Env(value string) (string, error)
- func InGoPackageDir(pkg string, fn func() error) error
- func InstallPackageCmd(packageName string) magelib.Cmd
- func IsPackageClean(pkg string) error
- func IsPackageCleanCmd(pkg string) magelib.Cmd
- func ModTidyCmd() magelib.Cmd
- func PackageDir(pkg string) (string, error)
- func UpdateGoModule(path string, vendor bool) error
- func UpdateModuleCmd(path string, vendor bool) magelib.Cmd
- func UpdatePackageCmd(packageName string) magelib.Cmd
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EnsureBranchInPackage ¶
EnsureBranchInPackage ensures that a specific branch is checked out in a Go package.
pkg: the path to the Go package. branchName: the name of the branch to ensure.
error: an error if there was a problem ensuring the branch.
func EnsureBranchInPackageCmd ¶
EnsureBranchInPackageCmd returns a function that ensures a specific branch is checked out in a Go package.
pkg: the path to the Go package. branchName: the name of the branch to ensure.
magelib.Cmd: a function that returns an error if there was a problem ensuring the branch.
func Env ¶
Env returns the value of the specified golang environment variable.
value: the name of the environment variable to retrieve. string: the value of the environment variable, or an empty string if it is undefined. error: any error that occurred while retrieving the environment variable value.
func InGoPackageDir ¶
InGoPackageDir executes a function within the directory of a Go package in GOPATH.
pkg: the name of the Go package. fn: the function to be executed within the package directory. error: any error that occurred during execution.
func InstallPackageCmd ¶
func IsPackageClean ¶
IsPackageClean checks if a Go package has unstaged files that have been changed in repo or staged files have been modified in repo or repo is not in sync with the remote repo
path is the path to the repository. status is the status information of the repository. Returns an error if the repository status is not valid, otherwise nil.
func IsPackageCleanCmd ¶
IsPackageCleanCmd returns a function that checks if a Go package is clean.
pkg: the path to the Go package. magelib.Cmd: a function that returns an error if the package is not clean.
func ModTidyCmd ¶
func PackageDir ¶
PackageDir returns the directory path of a Go package in GOPATH.
pkg: the name of the Go package. string: the directory path of the Go package. error: any error that occurred while retrieving the directory path.
func UpdateGoModule ¶
UpdateGoModule updates the Go module at the specified path.
path: the directory path where the Go module is located. vendor: a boolean indicating whether to vendor the dependencies.
error: an error if the update operation fails.
func UpdateModuleCmd ¶
UpdateModuleCmd returns a command that updates the Go module at the specified path.
path: the directory path where the Go module is located. vendor: a boolean indicating whether to vendor the dependencies.
magelib.Cmd: a command that updates the Go module.
func UpdatePackageCmd ¶
Types ¶
This section is empty.