Documentation
¶
Overview ¶
Package utils provides extra utility for the program
Index ¶
- Constants
- func CheckGitConfig(key string) (bool, error)
- func ExecuteCmd(name string, args []string, dir string) error
- func GetRootDir(moduleName string) string
- func GoFmt(appDir string) error
- func GoGetPackage(appDir string, packages []string) error
- func GoTidy(appDir string) error
- func InitGoMod(projectName string, appDir string) error
- func NonInteractiveCommand(use string, flagSet *pflag.FlagSet) string
- func ValidateModuleName(moduleName string) bool
Constants ¶
View Source
const ProgramName = "go-blueprint"
Variables ¶
This section is empty.
Functions ¶
func CheckGitConfig ¶ added in v0.5.3
func ExecuteCmd ¶
ExecuteCmd provides a shorthand way to run a shell command
func GetRootDir ¶ added in v0.7.9
GetRootDir returns the project directory name from the module path. Returns the last token by splitting the moduleName with /
func GoGetPackage ¶
GoGetPackage runs "go get" for a given package in the selected directory
func NonInteractiveCommand ¶ added in v0.2.9
NonInteractiveCommand creates the command string from a flagSet to be used for getting the equivalent non-interactive shell command
func ValidateModuleName ¶ added in v0.7.9
ValidateModuleName returns true if it's a valid module name. It allows any number of / and . characters in between.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.