utils

package
v1.1.59 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMap

func ToMap[T any](value T) (map[string]interface{}, error)

ToMap converts a typed struct to map[string]interface{} Completely stateless - just give it a struct and it returns the map

func ToStruct

func ToStruct[T any](value map[string]interface{}) (T, error)

ToStruct converts a map[string]interface{} to a typed struct Completely stateless - just give it a value and it returns the typed struct Uses JSON marshal/unmarshal for better handling of nested structs, slices, and custom types

Types

This section is empty.

Jump to

Keyboard shortcuts

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