Documentation
¶
Overview ¶
Package cmdutils contains shared functions for commands.
Note that these functions may trigger a process shutdown, DO NOT call these from any other place other than the command line interface.
Index ¶
- func ExitWithError(message string, exitCode int)
- func ExitWithStackTrace(message string)
- func FilterOutLoadedRepositories(repoURLsToAdd []string, alreadyPresent map[string]string) []string
- func GetGitRepoRootFromWorkingDirectory() string
- func GetLoadedConfigFilePaths() []string
- func GetLoadedRepositories() map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitWithError ¶
ExitWithError exits the application gracefully with the provided exit status :exitCode, printing both message and stack trace at the `error` level
func ExitWithStackTrace ¶
func ExitWithStackTrace(message string)
ExitWithStackTrace exits the application gracefully with exit status 0 while printing both message and stack trace at the 'trace' level
func FilterOutLoadedRepositories ¶ added in v0.1.20
func FilterOutLoadedRepositories( repoURLsToAdd []string, alreadyPresent map[string]string, ) []string
FilterOutLoadedRepositories returns a slice of strings that has repository paths that do not already exist in the configuration :alreadyPresent argument
func GetGitRepoRootFromWorkingDirectory ¶
func GetGitRepoRootFromWorkingDirectory() string
GetGitRepoRootFromWorkingDirectory returns the full path of the child directory containing a ./.git directory from the current working directory
func GetLoadedConfigFilePaths ¶ added in v0.1.20
func GetLoadedConfigFilePaths() []string
GetLoadedConfigFilePaths returns a slice of strings where each string is an absolute path to a loaded configuration file
func GetLoadedRepositories ¶ added in v0.1.20
GetLoadedRepositories retrieves repositories that have already been loaded and returns a `map[string]string` where the key value equals the local path of the repository and the value equals the full absolute path of the configuration file
Types ¶
This section is empty.