utils

package
v0.0.0-...-854c827 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmOrPMFormatter

func AmOrPMFormatter(hour int, minute int, second int) string

amOrPMFormatter formats and returns the time in a 12-hour clock format with AM/PM suffix. It takes hour, minute, and second as input parameters and returns the formatted time string.

func ArrayIncludes

func ArrayIncludes(array []string, value string) bool

func ArrayReplace

func ArrayReplace(text string, old []string, new []string) string

func Date

func Date() string

func DayFormatter

func DayFormatter(day int) string

dayFormatter takes a day of the month as an integer and returns a string in the format [number] [suffix]. The suffix is determined by the day of the month, following the standard English rules for ordinal numbers. For example, the 1st, 2nd, 3rd, 21st, 22nd, and 23rd will have the suffixes "st", "nd", "rd", "st", "nd", and "rd", respectively. All other days of the month will have the suffix "th".

func Debug

func Debug(message ...any)

func Error

func Error(message ...any)

func Fatal

func Fatal(message ...any)

func FormatString

func FormatString(str string, value []string) string

func Info

func Info(message ...any)

func IntToString

func IntToString(value int) string

func Log

func Log(state string) func(...any)

func LogSorter

func LogSorter(v ...any) string

func MonthFormatter

func MonthFormatter(month time.Month) string

monthFormatter takes a time.Month and returns a string of the full name of the month, such as "January" or "February".

func ToLower

func ToLower(value string) string

func Warning

func Warning(message ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL