Documentation ¶
Index ¶
- Variables
- func ApplyTemplate(tpl []byte, data interface{}) string
- func BailOnError(err error)
- func Command(cmd ...string)
- func Dim(text ...string) string
- func ExtractGitHubHandleFromEmail(email string) string
- func FileExists(name string) bool
- func FindGoWorkFile(path string) (string, bool)
- func FindMainFileInDirectory(directoryPath string) (string, error)
- func GetCurrentGoVersion() string
- func GetGitHubInfo() (handle, email string, err error)
- func GetLastChange(dirs ...string) (time.Time, error)
- func Highlight(text ...string)
- func HighlightCommand(cmd string, args ...string)
- func HighlightComment(txt string)
- func Highlighter(text ...string) string
- func InSlice[V comparable](item V, slice []V) bool
- func IndexOf[V comparable](slice []V, target V) int
- func InsertArgAt(index int, value string) error
- func Map[V comparable](slice []V, fn func(el V) V) []V
- func Output(cmd string, cwd ...string) ([]byte, error)
- func ReadTextFile(path string) (string, error)
- func RemoveArgAt(index int) error
- func Run(cmd string, cwd ...string) error
- func Stderr(msg interface{}, exit ...bool)
- func Stdout(txt string, exit ...bool)
- func Stream(cmd string, cwd ...string) error
- func StreamNoHighlight(cmd string, cwd ...string) error
- func StreamNoStdErr(cmd string, cwd ...string) error
- func StreamNoStdErrNoHighlight(cmd string, cwd ...string) error
- func StreamRaw(cmd string, cwd ...string) error
- func StreamRawNoHighlight(cmd string, cwd ...string) error
- func SubtleHighlight(text ...string)
- func SubtleHighlighter(text ...string) string
- func WriteFile(path string, content []byte, exitOnError ...bool) error
- func WriteTextFile(path string, content string, exitOnError ...bool) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ApplyTemplate ¶
func BailOnError ¶
func BailOnError(err error)
func FileExists ¶
func FindGoWorkFile ¶
func FindMainFileInDirectory ¶
func GetCurrentGoVersion ¶
func GetCurrentGoVersion() string
func GetGitHubInfo ¶
Function to get GitHub handle and email from global Git config
func HighlightCommand ¶
func HighlightComment ¶
func HighlightComment(txt string)
func Highlighter ¶ added in v1.0.2
func InSlice ¶
func InSlice[V comparable](item V, slice []V) bool
InSlice determines whether a value is in the slice. Uses generics to specify type.
func IndexOf ¶
func IndexOf[V comparable](slice []V, target V) int
IndexOf returns the position of the specified item
func InsertArgAt ¶
InsertArgAt inserts an argument into os.Args at the specified position
func Map ¶
func Map[V comparable](slice []V, fn func(el V) V) []V
func ReadTextFile ¶
func RemoveArgAt ¶
RemoveArgAt removes the os.Arg at the specified index
func StreamNoHighlight ¶ added in v1.0.5
func StreamNoStdErr ¶ added in v1.0.7
func StreamNoStdErrNoHighlight ¶ added in v1.0.7
func StreamRawNoHighlight ¶ added in v1.0.5
func SubtleHighlight ¶
func SubtleHighlight(text ...string)
func SubtleHighlighter ¶ added in v1.0.2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.