types

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDate

func IsDate(t time.Time) bool

IsDate return true when time.Time doesn't contain a time component, false otherwise.

func IsFloat

func IsFloat(f float64) bool

IsFloat return true when float has decimals, false otherwise.

func ToInt64 added in v1.0.0

func ToInt64(v any) (int64, error)

func ToInterfaceSlice added in v1.7.0

func ToInterfaceSlice[IN any, OUT any](in []IN) []OUT

Types

type Date

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

func NewDate

func NewDate(t time.Time) Date

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

MarshalJSON turn Date into JSON Value instead of pointer receiver because only that way it can be used for both.

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(text []byte) (err error)

UnmarshalJSON turn JSON into Date.

Jump to

Keyboard shortcuts

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