num

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Number

type Number struct {
	// contains filtered or unexported fields
}

Number type of numberic

func Make

func Make() *Number

Make create a empty instance

func Of

func Of(value interface{}) *Number

Of make a new number

func (Number) Complex

func (n Number) Complex() complex128

Complex is alias of Complex128 converts and returns as complex128

func (Number) Complex128

func (n Number) Complex128() complex128

Complex128 converts and returns as complex128

func (Number) Complex64

func (n Number) Complex64() complex64

Complex64 converts and returns as Complex64

func (Number) Float

func (n Number) Float() float64

Float is alias of Float64 converts and returns as float64

func (Number) Float32

func (n Number) Float32() float32

Float32 converts and returns as float32

func (Number) Float64

func (n Number) Float64() float64

Float64 converts and returns as float64

func (Number) Int

func (n Number) Int() int

Int converts and returns as Int

func (Number) Int16

func (n Number) Int16() int16

Int16 the return value is the type of int16 and remove the decimal

func (Number) Int32

func (n Number) Int32() int32

Int32 the return value is the type of int32 and remove the decimal

func (Number) Int64

func (n Number) Int64() int64

Int64 the return value is the type of int64 and remove the decimal

func (Number) Int8

func (n Number) Int8() int8

Int8 converts and returns as Int8

func (Number) IsComplex

func (n Number) IsComplex() bool

IsComplex checks whether <v> is type of complex.

func (Number) IsFloat

func (n Number) IsFloat() bool

IsFloat checks whether <v> is type of float.

func (Number) IsInt

func (n Number) IsInt() bool

IsInt checks whether <v> is type of int.

func (Number) IsNil

func (n Number) IsNil() bool

IsNil checks whether <v> is nil.

func (Number) IsSet

func (n Number) IsSet() bool

IsSet checks whether <v> is not nil.

func (*Number) MarshalJSON

func (n *Number) MarshalJSON() ([]byte, error)

MarshalJSON for json marshalJSON

func (*Number) Scan

func (n *Number) Scan(src interface{}) error

Scan for db scan

func (*Number) Set

func (n *Number) Set(value interface{}) (old interface{})

Set set <value> to <v>, and returns the old value.

func (Number) ToFixed

func (n Number) ToFixed(places int) string

ToFixed the return value is the type of float64 and keeps the given decimal places

func (Number) Uint

func (n Number) Uint() uint

Uint the return value is the type of uint and remove the decimal

func (Number) Uint16

func (n Number) Uint16() uint16

Uint16 the return value is the type of uint16 and remove the decimal

func (Number) Uint32

func (n Number) Uint32() uint32

Uint32 the return value is the type of uint32 and remove the decimal

func (Number) Uint64

func (n Number) Uint64() uint64

Uint64 the return value is the type of uint64 and remove the decimal

func (Number) Uint8

func (n Number) Uint8() uint8

Uint8 the return value is the type of uint8 and remove the decimal

func (Number) Uintptr

func (n Number) Uintptr() uintptr

Uintptr the return value is the type of uintptr

func (*Number) UnmarshalJSON

func (n *Number) UnmarshalJSON(data []byte) error

UnmarshalJSON for json marshalJSON

func (*Number) Value

func (n *Number) Value() (driver.Value, error)

Value for db driver value

Jump to

Keyboard shortcuts

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