unmarshal

package
v0.0.0-...-cbea63e Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v interface{}) bool

Bool converts empty string, "0" and "false" to false, every other string to true. And if the v is acutally a bool, returns what it is.

func Float64

func Float64(v interface{}) float64

Float64 converts string, float32 to float64.

func Int32

func Int32(v interface{}) int32

Int32 converts strings, float32, float64 and int64 to int32 There could be data loss if you would like to convert from float32, float64 and int64

func Int64

func Int64(v interface{}) int64

Int64 converts strings, float32, float64 and int32 to int64 There could be data loss if you would like to convert from float32 or float64

func String

func String(v interface{}) string

String gets an interface type and tries to convert it to a string If it can't it returns empty string

func Time

func Time(v interface{}) time.Time

Time gets an interface type and tries to convert it to a time.Time. If it's capable of handling string, int64 and float64. Otherwise it would return default value of time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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