Documentation ¶
Index ¶
- Constants
- func DayEnd(now time.Time) time.Time
- func DayStart(now time.Time) time.Time
- func FixedWidthAppend(s string, width int) string
- func FixedWidthPrepend(s string, width int) string
- func HourEnd(now time.Time) time.Time
- func HourStart(now time.Time) time.Time
- func RandString(n int) string
- func TemplateString(base string, data any) (string, error)
Constants ¶
View Source
const Letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Letters is a string containing all ASCII letters, including both cases
Variables ¶
This section is empty.
Functions ¶
func DayEnd ¶
DayEnd returns the end of the current day This is technically just the start of the following day, because it's easier
func FixedWidthAppend ¶
FixedWidthAppend returns a string with an exact length, appending whitespace if extra characters are needed
func FixedWidthPrepend ¶
FixedWidthPrepend works exactly like FixedWidthAppend, but prepends whitespace instead of appending
func HourEnd ¶
Returns the end of the current hour This works akin to DayEnd in that it's just the start of the following hour
func RandString ¶
RandString generates a random string of length n, containing only ASCII letters
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.