utils

package
v0.0.0-...-52d01f9 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValue

func GetValue(obj interface{}, keys []string) (reflect.Value, error)

func GetValue2

func GetValue2(obj interface{}, path string) (reflect.Value, error)

func GetValueWithDefaultValue

func GetValueWithDefaultValue(obj interface{}, path string, defaultValue interface{}) interface{}

GetValueWithDefaultValue Try to find the value given some key, if the key does not exist return a default value

func Pointer

func Pointer[T PointerType](b T) *T

Types

type PointerType

type PointerType interface {
	int | int8 | int16 | int32 | int64 | float32 | float64 | string | bool
}

Jump to

Keyboard shortcuts

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