reflect_utils

package
v0.0.0-...-932f57c Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsOfReflectTypeCB

func FieldsOfReflectTypeCB(ityp reflect.Type, appendDotField, appendField func(*IndexableStructField))

func Filter

func Filter(s any, f func(item any) bool) any

func GetStruct

func GetStruct(t reflect.Type) interface{}

Types

type IndexableStructField

type IndexableStructField struct {
	reflect.StructField
	Index []int
	Names []string
}

func (*IndexableStructField) String

func (f *IndexableStructField) String() string

type IndexableStructFields

type IndexableStructFields []*IndexableStructField

func FieldsOfReflectType

func FieldsOfReflectType(ityp reflect.Type) (dotFields, fields IndexableStructFields)

func UniqueFieldsOfReflectType

func UniqueFieldsOfReflectType(ityp reflect.Type) (dotFields, result IndexableStructFields)

func (IndexableStructFields) Get

func (IndexableStructFields) Len

func (f IndexableStructFields) Len() int

func (IndexableStructFields) Only

func (f IndexableStructFields) Only(names ...string) (s IndexableStructFields)

func (IndexableStructFields) String

func (f IndexableStructFields) String() string

func (IndexableStructFields) Uniquefy

Jump to

Keyboard shortcuts

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