structs

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyProperties

func CopyProperties[T, U any](dst *U, src T) error

CopyProperties copy the common fields from struct `src` to struct `dst`

func SetField added in v0.0.5

func SetField(obj interface{}, fieldName string, value interface{})

func ToMap

func ToMap(v any) map[string]string

ToMap convert struct to map, only convert exported struct field map key is specified same as struct field tag `json` value.

func ToMapInterface

func ToMapInterface(v interface{}) map[string]any

ToMapInterface convert struct to map, only convert exported struct field map key is specified same as struct field tag `json` value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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