xas

package
v0.0.0-...-796497b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindTime reflect.Kind = iota + 1000000000
	KindDuration
)
View Source
const (
	B = 1 << (10 * iota)
	KB
	MB
	GB
	TB
	PB
	EB
)

Variables

This section is empty.

Functions

func ChangeStructFields

func ChangeStructFields(structPtr interface{}, changesMap map[string]interface{})

ChangeStruct applies map of changes to struct

func Convert

func Convert(value interface{}, t reflect.Kind) (interface{}, error)

func FormatIntToByte

func FormatIntToByte(b int64) string

func FromBase64

func FromBase64(valuea ...interface{}) string

func FromTime

func FromTime(time time.Time) string

func IsBool

func IsBool(input interface{}) bool

func IsEmpty

func IsEmpty(valuea ...interface{}) bool

func IsFloat

func IsFloat(input interface{}) bool

func IsInt

func IsInt(input interface{}) bool

func IsKind

func IsKind(valuea ...interface{}) bool

func IsNillable

func IsNillable(input interface{}) bool

func IsPtr

func IsPtr(obj interface{}) bool

func IsString

func IsString(input interface{}) bool

func IsTime

func IsTime(input interface{}) bool

func OfKind

func OfKind(valuea ...interface{}) string

func OfType

func OfType(valuea ...interface{}) string

func RuneWidth

func RuneWidth(r rune) int

func SetField

func SetField(structPtr interface{}, k string, v interface{})

func SetStructField

func SetStructField(structPtr interface{}, name string, value interface{}) error

func ToBase64

func ToBase64(valuea ...interface{}) string

func ToBool

func ToBool(valuea ...interface{}) bool

func ToBytes

func ToBytes(valuea ...interface{}) []byte

func ToCamelCase

func ToCamelCase(str string) string

func ToDuration

func ToDuration(valuea ...interface{}) time.Duration

func ToFixedLengthAfter

func ToFixedLengthAfter(str string, spacer string, length int) string

func ToFixedLengthBefore

func ToFixedLengthBefore(str string, spacer string, length int) string

func ToFixedLengthCenter

func ToFixedLengthCenter(str string, spacer string, length int) string

func ToFloat

func ToFloat(valuea ...interface{}) float64

func ToFloat32

func ToFloat32(valuea ...interface{}) float32

func ToFloatFromXString

func ToFloatFromXString(valuea ...string) float64

func ToIP

func ToIP(valuea ...interface{}) net.IP

func ToInt

func ToInt(valuea ...interface{}) int

func ToInt16

func ToInt16(valuea ...interface{}) int16

func ToInt32

func ToInt32(valuea ...interface{}) int32

func ToInt64

func ToInt64(valuea ...interface{}) int64

func ToInt8

func ToInt8(valuea ...interface{}) int8

func ToMapInterfaceFromMapString

func ToMapInterfaceFromMapString(src map[string]string) map[string]interface{}

func ToMapStringFromMapInterface

func ToMapStringFromMapInterface(src map[interface{}]interface{}) map[string]interface{}

func ToRuneLength

func ToRuneLength(valuea ...interface{}) int

func ToSlice

func ToSlice(valuea ...interface{}) []interface{}

func ToSliceInterface

func ToSliceInterface(iface ...interface{}) (ret []interface{})

func ToString

func ToString(valuea ...interface{}) string

func ToStringMap

func ToStringMap(valuea ...interface{}) map[string]interface{}

func ToStringMapString

func ToStringMapString(valuea ...interface{}) map[string]string

func ToStringSlice

func ToStringSlice(valuea ...interface{}) []string

func ToTime

func ToTime(simple bool, valuea ...interface{}) time.Time

func ToUint

func ToUint(valuea ...interface{}) uint64

func Trimmed

func Trimmed(valuea ...interface{}) string

func TypeName

func TypeName(v interface{}) string

func Width

func Width(str string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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