rfutil

package
v0.0.0-...-a938bc3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package rfutil contains reflect utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EachStructField

func EachStructField(v any, f func(reflect.StructField, reflect.Value) error) error

EachStructField calls the given function for each field of the given struct.

func SetPrimitiveFromString

func SetPrimitiveFromString(rf reflect.Type, rv reflect.Value, s string) error

SetPrimitiveFromString sets the value of a primitive type from a string. It supports strings, ints, uints, floats and bools. If s is empty, the value is left untouched.

Types

This section is empty.

Jump to

Keyboard shortcuts

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