Documentation ¶
Index ¶
- func ContainsNonASCIICharacters(ua string) bool
- func PastDay(n int) time.Time
- func RandString(n int) string
- func RandUint32() uint32
- func RandUint64() uint64
- func RunAtMidnight(f func()) context.CancelFunc
- func ShortenString(str string, n int) string
- func StripWWW(hostname string) string
- func Today() time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsNonASCIICharacters ¶
ContainsNonASCIICharacters returns whether the string only consists out of ASCII characters or not.
func PastDay ¶
PastDay returns the date for today without time minus the given number of days at UTC.
func RandString ¶
RandString returns a random string for given length.
func RunAtMidnight ¶
func RunAtMidnight(f func()) context.CancelFunc
RunAtMidnight calls given function on each day of month on midnight (UTC), unless it is cancelled by calling the cancel function.
func ShortenString ¶
ShortenString shortens given string to the given maximum number of bytes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.