util

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCmd

func ExecuteCmd(cmd *cobra.Command, command string, args []string)

ExecuteCmd execute a command and print result to stdout or stderr

func GetConfigDirectory

func GetConfigDirectory() string

GetConfigDirectory returns the config directory for the executing user

func GetExecutable

func GetExecutable() string

GetExecutable returns the path of the executable

func GetWinExtension

func GetWinExtension() string

GetWinExtension returns windows file extentions if running in windows

func RequireFile

func RequireFile(fileName string) error

RequireFile checks for a given file and returns an error message to user if it doesn't exists

func UsageErrorf

func UsageErrorf(cmd *cobra.Command, format string, args ...interface{}) error

UsageErrorf shows usage message of cli

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL