Documentation
¶
Overview ¶
Package utils contains utility functions for the SonicRed server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutLog ¶
CutLog truncates a string to ensure it does not exceed a specified length, appending a suffix if truncation occurs.
func ExecutableTime ¶
func ExecutableTime() string
ExecutableTime retrieves the modification time of the current executable and returns it formatted as an RFC3339 string. If the executable lookup fails, the time since the start of the program is returned instead.
Types ¶
type LangPref ¶
LangPref represents a language preference with language, variant, and a quality factor (preference value).
func ParseLanguageHeader ¶
ParseLanguageHeader parses the Accept-Language header and returns a sorted slice of LangPref by preference value.
Click to show internal directories.
Click to hide internal directories.