converter

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrIntToArrString

func ArrIntToArrString(arrInt []int) []string

ArrIntToArrString converts an array of integers to an array of strings.

func JsonToArrayOfInterface added in v1.0.1

func JsonToArrayOfInterface(jsonData []byte) (result []interface{})

JsonToArrayOfInterface convert json to []interface{}

func JsonToMapStrInterface added in v1.0.1

func JsonToMapStrInterface(jsonData []byte) (result map[string]interface{})

JsonToMapStrInterface convert json to map[string]interface{}

func ToArrayOfInt

func ToArrayOfInt(v interface{}) (result []int)

ToArrayOfInt convert any value to []int

func ToArrayOfInt32

func ToArrayOfInt32(v interface{}) (result []int32)

ToArrayOfInt32 convert any value to []int32

func ToArrayOfInt64

func ToArrayOfInt64(v interface{}) (result []int64)

ToArrayOfInt64 convert any value to []int64

func ToArrayOfString

func ToArrayOfString(value interface{}) (result []string)

ToArrayOfString convert any value to []string

func ToBool

func ToBool(value interface{}) (result bool)

ToBool convert any value to boolean

func ToInt

func ToInt(value interface{}) (result int)

ToInt converts any value to int

func ToInt16

func ToInt16(value interface{}) (result int16)

ToInt16 converts any value to int16

func ToInt32

func ToInt32(value interface{}) (result int32)

ToInt32 converts any value to int32

func ToInt64

func ToInt64(value interface{}) (result int64)

ToInt64 converts any value to int64

func ToJson

func ToJson(data interface{}) (jsonData []byte)

ToJson convert any value to json

func ToJsonString

func ToJsonString(data interface{}) (jsonString string)

ToJsonString convert any value to json string

func ToString

func ToString(value interface{}) (result string)

ToString converts any value to string

func ToTime

func ToTime(value interface{}, parseFormat string) (result time.Time)

ToTime convert any value to time.Time other than string type, parseFormat use empty string

Types

This section is empty.

Jump to

Keyboard shortcuts

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