gconv

package
v0.0.0-...-c9a36a8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

类型转换. 内部使用了bytes作为底层转换类型,效率很高。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(i interface{}) bool

false: "", 0, false, off

func Bytes

func Bytes(i interface{}) []byte

func Convert

func Convert(i interface{}, t string) interface{}

将变量i转换为字符串指定的类型t

func Float32

func Float32(i interface{}) float32

func Float64

func Float64(i interface{}) float64

func Int

func Int(i interface{}) int

func Int16

func Int16(i interface{}) int16

func Int32

func Int32(i interface{}) int32

func Int64

func Int64(i interface{}) int64

func Int8

func Int8(i interface{}) int8

func String

func String(i interface{}) string

基础的字符串类型转换

func Strings

func Strings(i interface{}) []string

func Time

func Time(i interface{}, format ...string) time.Time

将变量i转换为time.Time类型

func TimeDuration

func TimeDuration(i interface{}) time.Duration

将变量i转换为time.Time类型

func Uint

func Uint(i interface{}) uint

func Uint16

func Uint16(i interface{}) uint16

func Uint32

func Uint32(i interface{}) uint32

func Uint64

func Uint64(i interface{}) uint64

func Uint8

func Uint8(i interface{}) uint8

Types

This section is empty.

Jump to

Keyboard shortcuts

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