Documentation ¶
Index ¶
- Constants
- func ExpandTilde(path string) string
- func GetNewTabWriter(output io.Writer) *tabwriter.Writer
- func GitDirNameFromURL(urlString string) string
- func PrintObjects(objects interface{}, template string, w io.Writer, noHeaders bool) error
- func Setenv(envVars ...EnvVar)
- func Unsetenv(envVars ...EnvVar)
- func UserHomeDir() string
- func WriteFiles(fls map[string][]byte, mode os.FileMode) error
- type EnvVar
Constants ¶
const ( // PhaseListFormat is used to print tables with phase list PhaseListFormat = "NAMESPACE:metadata.namespace,NAME:metadata.name,CLUSTER NAME:metadata.clusterName," + "EXECUTOR:config.executorRef.kind,DOC ENTRYPOINT:config.documentEntryPoint" // PlanListFormat is used to print tables with plan list PlanListFormat = "NAMESPACE:metadata.namespace,NAME:metadata.name,DESCRIPTION:description" // HostListFormat is used to print tables with host list HostListFormat = "NodeName:nodename,NodeID:nodeid" )
Variables ¶
This section is empty.
Functions ¶
func ExpandTilde ¶
ExpandTilde expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~` or has no slash after tilde, the path is returned as-is.
func GetNewTabWriter ¶
GetNewTabWriter returns a tabwriter that translates tabbed columns in input into properly aligned text.
func GitDirNameFromURL ¶
GitDirNameFromURL extract directory name of the repository from URL
func PrintObjects ¶
PrintObjects prints suitable
func Setenv ¶
func Setenv(envVars ...EnvVar)
Setenv is used to set variable number of env variables, if an error occurs it will be printed to logger
func Unsetenv ¶
func Unsetenv(envVars ...EnvVar)
Unsetenv is used to unset variable number of env variables, if an error occurs it will be printed to logger
func UserHomeDir ¶
func UserHomeDir() string
UserHomeDir is a utility function that wraps os.UserHomeDir and returns no errors. If the user has no home directory, the returned value will be the empty string