converter

package
v0.0.0-...-5bb0c7b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsArray

func AsArray(v interface{}) []interface{}

func AsBool

func AsBool(v interface{}, defaultValue bool) bool

func AsDuration

func AsDuration(v interface{}, defaultValue time.Duration) time.Duration

单位为秒

func AsFloat64

func AsFloat64(v interface{}, defaultValue float64) float64

func AsInt

func AsInt(v interface{}, defaultValue int) int

func AsInt32

func AsInt32(v interface{}, defaultValue int32) int32

func AsInt64

func AsInt64(v interface{}, defaultValue int64) int64

func AsMap

func AsMap(v interface{}) map[string]interface{}

func AsMapSlice

func AsMapSlice(v interface{}) []map[string]interface{}

func AsString

func AsString(v interface{}, defaultValue string) string

func AsStringSlice

func AsStringSlice(v interface{}, defaultValue []string) []string

func AsUInt32

func AsUInt32(v interface{}, defaultValue uint32) uint32

func ConvertToInterface

func ConvertToInterface(m interface{}, template interface{}) interface{}

func ConvertToMap

func ConvertToMap(s interface{}) map[string]interface{}

func ConvertToSlice

func ConvertToSlice(m interface{}, template []interface{}) []interface{}

func MustAsInt

func MustAsInt(v interface{}) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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