Documentation ¶
Index ¶
- Variables
- func Contains(haystack []string, needle string) bool
- func DisplayURL(urlStr string) string
- func FuzzyAgo(ago time.Duration) string
- func FuzzyAgoAbbr(now time.Time, createdAt time.Time) string
- func Humanize(s string) string
- func HumanizeDuration(dur time.Duration) string
- func IsCygwinTerminal(f *os.File) bool
- func IsURL(s string) bool
- func ListJoinStr(items []string, delim string) string
- func Pluralize(num int, thing string) string
- func RelativePath(base, path string) string
- func ValidURL(urlStr string) bool
- type ComparableStringer
Constants ¶
This section is empty.
Variables ¶
View Source
var IsTerminal = func(f *os.File) bool { return isatty.IsTerminal(f.Fd()) || IsCygwinTerminal(f) }
Functions ¶
func DisplayURL ¶
func HumanizeDuration ¶
HumanizeDuration returns a relative time string based on an input duration
func IsCygwinTerminal ¶
func ListJoinStr ¶
ListJoinStr joins a slice of strings with a specified delimeter
func RelativePath ¶ added in v0.6.0
RelativePath resolve a relative to the base path.
Types ¶
type ComparableStringer ¶
type ComparableStringer interface { fmt.Stringer comparable }
Click to show internal directories.
Click to hide internal directories.