utils

package
v3.0.0-dev.59 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFromMap

func ConvertFromMap(m map[string]any, target any) error

ConvertFromMap uses json to marshal and unmarshal a map into a target type

func ConvertToMap

func ConvertToMap(target any, m *map[string]any) error

ConvertToMap uses json to marshal and unmarshal a target type into a map

func MergeMaps

func MergeMaps(dest map[string]any, src map[string]any)

MergeMaps combines the src map keys and values with the dest map keys and values if the key exists

func MergeValues

func MergeValues(dest any, src any) error

MergeValues combines src (zeros removed) with the dest

func RemoveZeroValues

func RemoveZeroValues(target map[string]any)

RemoveZeroValues iterates over a map and removes any zero values it may have

Types

This section is empty.

Jump to

Keyboard shortcuts

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