Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpToJSON ¶
DumpToJSON is a debugging utility that marshals the given value into an indented JSON string. It accepts any value (v) to be serialized and an indentation string (i), which defaults to two spaces (" ") if empty. Since it is intended for debugging, it swallows marshal errors and returns the error message string instead.
func FormatGenericDateTimeToGolangLayout ¶
FormatGenericDateTimeToGolangLayout converts a universal date/time format string (e.g., "YYYY-MM-DD HH:mm:ss.SSS a") into Go's native reference time layout. It maps standard placeholders for year, month, day, hours, minutes, seconds, milliseconds, meridiem indicators (AM/PM), and timezones to their corresponding Go time layout tokens. Returns the translated string ready to be used with Go's time parsing and formatting functions.
func NewInstanceOf ¶
func NewInstanceOf[T any]() T
NewInstanceOf utilizes generics and reflection to allocate and return a fully initialized instance of type T. If T is a value type, it returns the initialized zero value allocated in memory. If T is a pointer type, it automatically resolves the underlying struct type, allocates the necessary memory for it, and returns the valid pointer, preventing nil pointer panics.
func Print ¶
PrintLog writes a message to the standard output. If no extra arguments (args) are provided, it behaves like fmt.Println, printing the message directly. If extra arguments are provided, it treats the message as a format string and behaves like fmt.Printf, automatically appending a newline character.
Types ¶
This section is empty.