utils

package
v0.0.0-...-fdebec4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelFatal = slog.Level(12)
)
View Source
const (
	PAGING_LIMIT = 1000
)

Variables

View Source
var (
	ROOT_DIR        = filepath.Dir("../../..")
	DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%fZ"
)
View Source
var (
	TestDBPath = filepath.Join(ROOT_DIR, "test.sqlite")
)

Functions

func AllEqual

func AllEqual[T comparable](slice []T) bool

Helper function to check if all elements in a slice are equal

func GetStringUUIDv7

func GetStringUUIDv7() string

func InitLogger

func InitLogger(logLevel string)

Initialize logger

func SetupTeardown

func SetupTeardown(tb testing.TB) func(tb testing.TB)

Types

type LoggerType

type LoggerType struct {
	*slog.Logger
}
var Logger *LoggerType

func (*LoggerType) Debug

func (l *LoggerType) Debug(msg string, args ...any)

func (*LoggerType) Error

func (l *LoggerType) Error(msg string, args ...any)

func (*LoggerType) Fatal

func (l *LoggerType) Fatal(msg string, args ...any)

func (*LoggerType) Info

func (l *LoggerType) Info(msg string, args ...any)

func (*LoggerType) Warn

func (l *LoggerType) Warn(msg string, args ...any)

Jump to

Keyboard shortcuts

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