conv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInterfaceToStringMap = errors.New("converting interface to map[string]string failed")
	ErrInterfaceToString    = errors.New("converting interface to string failed")
	ErrInterfaceToBool      = errors.New("converting interface to bool failed")
	ErrInterfaceToInt64     = errors.New("converting interface to int64 failed")
	ErrInterfaceToInt       = errors.New("converting interface to int failed")
)

Functions

func InterfaceToBool

func InterfaceToBool(in interface{}) (bool, error)

InterfaceToBool converts a interface to a bool.

func InterfaceToInt

func InterfaceToInt(in interface{}) (int, error)

InterfaceToInt converts a interface from a json un-marshaled struct to a int.

func InterfaceToInt64

func InterfaceToInt64(in interface{}) (int64, error)

InterfaceToInt64 converts a interface from a json un-marshaled struct to a int64.

func InterfaceToString

func InterfaceToString(in interface{}) (string, error)

InterfaceToString converts a interface to a string.

func InterfaceToStringMap

func InterfaceToStringMap(in interface{}) (map[string]string, error)

InterfaceToStringMap converts a interface to map[string]string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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