refl

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFields

func ExtractFields(input any, targetTags []string) map[string]any

ExtractFields extracts the values of struct fields that have a "json" tag matching any of the targetTags. It accepts a struct or a pointer to a struct. Unexported fields, fields without a "json" tag, and fields with a json tag of "-" are ignored. It correctly handles json tag options like "omitempty" by only considering the name part of the tag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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