structsutils

package
v0.461.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStructHasNoField = errors.New("struct has no matching field")

Functions

func GetFieldValueAsString added in v0.461.0

func GetFieldValueAsString(structToGetValueFrom any, fieldName string) (string, error)

func GetFieldValuesAsString

func GetFieldValuesAsString(structToGetFieldsFrom any) (values []string, err error)

func HasField added in v0.461.0

func HasField(structToTest any, fieldName string) (bool, error)

func IsPointerToStruct

func IsPointerToStruct(objectToTest interface{}) (isStruct bool)

func IsStruct

func IsStruct(objectToTest interface{}) (isStruct bool)

func IsStructOrPointerToStruct

func IsStructOrPointerToStruct(objectToTest interface{}) (isStruct bool)

func ListFieldNames added in v0.461.0

func ListFieldNames(structToList any) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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