Documentation ¶
Index ¶
- func Capitalize(s string) string
- func ClearScreen()
- func Delete(path string) error
- func Exit(code int)
- func FileStem(path string) string
- func Ignore(f func() error)
- func Max[T constraints.Ordered](items ...T) (max T)
- func Min[T constraints.Ordered](items ...T) (min T)
- func PadZero(s string, l int) string
- func PrintErasable(msg string) (eraser func())
- func Quantify(count int, singular, plural string) string
- func ReGroups(pattern *regexp.Regexp, str string) (groups map[string]string)
- func SanitizeFilename(filename string) string
- func SkipCI(t *testing.T) bool
- func TerminalSize() (width, height int, err error)
- func Unzip(zipStream io.ReaderAt, size int64, dest string) error
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶
Capitalize returns a string with the first letter capitalized.
func Delete ¶
Delete removes the given path from the filesystem. It can handle both files and directories (recursively).
func Max ¶
func Max[T constraints.Ordered](items ...T) (max T)
Max returns the maximum value of the given items.
func Min ¶
func Min[T constraints.Ordered](items ...T) (min T)
Min returns the minimum value of the given items.
func PrintErasable ¶
func PrintErasable(msg string) (eraser func())
PrintErasable prints a string that can be erased by calling a returned function.
func ReGroups ¶
ReGroups parses the string with the given regular expression and returns the group values defined in the expression.
func SanitizeFilename ¶
SanitizeFilename will remove all invalid characters from a path.
func TerminalSize ¶
TerminalSize returns the dimensions of the given terminal.
Types ¶
Click to show internal directories.
Click to hide internal directories.