elconv

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsBool

func AsBool(v interface{}) bool

convert value to boolean

func AsFloat32

func AsFloat32(v interface{}) (res float32)

convert value to float32

func AsFloat64

func AsFloat64(v interface{}) (res float64)

convert value to float64

func AsInt

func AsInt(v interface{}) int

convert value to int

func AsInt64

func AsInt64(v interface{}) int64

convert value to int64

func AsPtr

func AsPtr(v interface{}) uintptr

get the pointer of `v`

func AsPtrRef

func AsPtrRef(r reflect.Value) uintptr

get the pointer of `r`

func AsSlice

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

convert `v` to a slice

func AsStr

func AsStr(v interface{}) string

convert value to string.

func AsUint

func AsUint(v interface{}) uint

convert value to uint

func AsUint64

func AsUint64(v interface{}) uint64

convert value to uint64

func AsValue

func AsValue(v interface{}) interface{}

If `v` is a pointer, return the value.

func AsValueRef

func AsValueRef(r reflect.Value) reflect.Value

If `r` is a pointer, return the value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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