Documentation ¶
Index ¶
- Variables
- func AZ_09(s string) bool
- func AddPrefix(s, pfx string) string
- func Arg(s []string, i int) string
- func Display(login, display string) string
- func Elapsed(t time.Duration) string
- func ElapsedAgo(t time.Time) string
- func ElapsedSeconds(t int64) string
- func Field(s string, f byte, n int) string
- func FormatElapsedAgo(s string) string
- func IsSmallUnum(s string) bool
- func IsUnsigned(s string) bool
- func NoBing(s string) string
- func Nonce() string
- func OwnAddress() string
- func Ratio(msg string) float64
- func StripHTML(v string) string
- func Trailer(s string, f byte, n int) string
- func TrimRight(s string) string
- func WithTimeout(ctx context.Context) (context.Context, context.CancelFunc)
- type LimitReader
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddPrefix ¶
AddPrefix adds pfx at the start of s, if s does not already start with pfx.
func Elapsed ¶
Elapsed returns a human-readable duration string where readability is more important than being precise.
func ElapsedAgo ¶
ElapsedAgo returns either a timestring with " ago" suffix or "on " followed by a date.
func Field ¶
Field returns the n'th field of s, separated by f. Returns empty string if the field does not exist.
func IsSmallUnum ¶
IsSmallUnum returns whether is a small unsigned integer.
func OwnAddress ¶
func OwnAddress() string
OwnAddress attempts to determine a local address used for internal communication. Should probably be replaced with "ip route get" for the relevant remote party.
func Trailer ¶
Trailer returns the remaining strings after the first n f-delimited fields.
func TrimRight ¶
TrimRight removes characters that are commonly used to bypass Twitch duplicate message detection.