convert

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 6 Imported by: 4

README

go-convert

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date

func Date(v interface{}) types.Date

Date cast input to types.Date and return default value if error.

func DateE

func DateE(v interface{}) (d types.Date, err error)

DateE cast input to types.Date and return the associated error.

func DateTime

func DateTime(v interface{}) types.DateTime

DateTime cast input to types.DateTime and return default value if error.

func DateTimeE

func DateTimeE(v interface{}) (dt types.DateTime, err error)

DateTimeE cast input to types.DateTime and return the associated error.

func DateYearMonth

func DateYearMonth(v interface{}) types.DateYearMonth

DateYearMonth cast input to types.DateYearMonth and return default value if error.

func DateYearMonthE

func DateYearMonthE(v interface{}) (d types.DateYearMonth, err error)

DateYearMonthE cast input to types.DateYearMonth and return the associated error.

func Float64

func Float64(v interface{}) float64

Float64 cast v to float64 and return default value if there is any error.

func Float64E

func Float64E(v interface{}) (o float64, err error)

Float64E casts input to float64

func Int

func Int(i interface{}) int

Int cast i to int and return default value if error.

func IntE

func IntE(input interface{}) (output int, err error)

IntE cast input to int

func SnakeCase

func SnakeCase(in string) string

SnakeCase

func String

func String(input interface{}) string

String cast input to string and return default value if error

func StringE

func StringE(input interface{}) (output string, err error)

StringE cast input to string

func Time

func Time(v interface{}) time.Time

Time cast input to time.Time and return default value if error.

func TimeE

func TimeE(v interface{}) (t time.Time, err error)

TimeE cast input to time.Time and return the associated error.

func Uint

func Uint(v interface{}) uint

Uint cast v to uint64 and return default value if there is any error.

func Uint64

func Uint64(v interface{}) uint64

Uint64 cast v to uint64 and return default value if there is any error.

func Uint64E

func Uint64E(v interface{}) (o uint64, err error)

Uint64E Cast input to uint64

func UintE

func UintE(v interface{}) (o uint, err error)

Uint64E Cast input to uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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