types

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 5 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 IsValidString added in v1.7.12

func IsValidString(s string) bool

IsValidString returns true if the given string is valid UTF-8

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.

type Stack added in v1.7.12

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

Stack of strings. See https://en.wikipedia.org/wiki/Stack_(abstract_data_type)

func NewStack added in v1.7.12

func NewStack() *Stack

func (*Stack) Peek added in v1.7.12

func (s *Stack) Peek() string

func (*Stack) Pop added in v1.7.12

func (s *Stack) Pop() string

func (*Stack) PopMany added in v1.7.12

func (s *Stack) PopMany(count int) []string

func (*Stack) Push added in v1.7.12

func (s *Stack) Push(value string)

Jump to

Keyboard shortcuts

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