convert

package
v1.18.12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToBool

func ToBool(src map[string]interface{}, key string) bool

ToBool looks for key in src and converts the value to a bool type. Returns false otherwise.

func ToFloat64

func ToFloat64(src map[string]interface{}, key string) float64

ToFloat64 looks for key in src and converts the value to a string type. Returns empty string otherwise.

func ToMap

func ToMap(src map[string]interface{}, key string) map[string]interface{}

ToMap looks for key in src and converts the value to a map type. Returns nil otherwise.

func ToSlice

func ToSlice(src map[string]interface{}, key string) []interface{}

ToSlice looks for key in src and converts the value to a slice type. Returns nil otherwise.

func ToString

func ToString(src map[string]interface{}, key string) string

ToString looks for key in src and converts the value to a string type. Returns empty string otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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