structutil

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEach

func ForEach[T any](structInstance T, function func(key string, value any, tag reflect.StructTag))

ForEach given a struct, calls the passed in function with each visible struct field's name, value and tag.

func ToMap

func ToMap[T any](structInstance T, structTags ...string) map[string]any

ToMap given a struct, converts it to a map[string]any. This function also takes struct tag names as optional parameters - if passed in, the struct tags will be used to remap or omit values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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