common

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package common contains commonly used functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Repr

func Repr(model any) string

Repr returns the name of the given model.

This can be used to print out the model name.

func SetStringField added in v0.5.0

func SetStringField(field reflect.Value, fieldName string, val string)

SetStringField is a helper function to set a string field dynamically if present.

func SetUintField added in v0.5.0

func SetUintField(field reflect.Value, fieldName string, val any)

SetUintField is a helper function to set a uint64 field dynamically if present.

func SetupLogger

func SetupLogger()

SetupLogger sets up the logging for the application.

The log level can be defined as the string "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL" in the configuration file. E.g. "LogLevel": "INFO". Defaults to "DEBUG".

Types

This section is empty.

Jump to

Keyboard shortcuts

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