Documentation ¶
Index ¶
- Variables
- func AskForConfirmation(s string) bool
- func ConditionalOp(message string, noop bool, fn func() error) error
- func ConfigureITerm(hostname string)
- func Contains(str string, haystack ...string) bool
- func Copy(src, dst string) error
- func CreateAndEdit(filePath string, content string) error
- func CurrentTimeForFilename() string
- func EditFile(filePath string) error
- func GetEnvWithDefault(key string, defaultValue string) string
- func GetTerminalSize() (uint, uint, error)
- func HasNonEmptyLines(lines []string) bool
- func InRepository() bool
- func IsITerm() bool
- func IsRepository(repoDir string) bool
- func JoinStringPointers(ptrs []*string, joinStr string) string
- func OpenURI(uriSegments ...string) error
- func PathExists(filePath ...string) (bool, error)
- func PickItem(label string, items []string) (string, error)
- func Prompt(message string)
- func ProperWordWrap(text string, lineWidth int) string
- func Random(min, max int) int
- func RemoveDuplicatesUnordered(elements []string) []string
- func ResetITerm()
- func RunCmd(cmd string, args ...string) error
- func RunCmdWithFullOutput(cmd string, args ...string) (string, error)
- func RunCmdWithStdout(cmd string, args ...string) (string, error)
- func SetBadge(name string)
- func TimeTrack(start time.Time, name string)
- func WordWrap(text string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FileDoesNotExist = errors.New("file or directory does not exists")
)
Functions ¶
func AskForConfirmation ¶
func ConfigureITerm ¶
func ConfigureITerm(hostname string)
func Copy ¶
Copy the src file to dst. Any existing file will be overwritten and will not Copy file attributes. From https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang
func CreateAndEdit ¶
func CurrentTimeForFilename ¶
func CurrentTimeForFilename() string
func GetEnvWithDefault ¶
func GetTerminalSize ¶
func HasNonEmptyLines ¶
func InRepository ¶
func InRepository() bool
func IsRepository ¶
func JoinStringPointers ¶
func PathExists ¶
func ProperWordWrap ¶
func ResetITerm ¶
func ResetITerm()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.