types

package
v1.17.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const Extra = "[[__extra_keys__]]"

Variables

View Source
var (
	Int     = TypeOf(0)
	Int8    = TypeOf(int8(0))
	Int16   = TypeOf(int16(0))
	Int32   = TypeOf(int32(0))
	Int64   = TypeOf(int64(0))
	Uint    = TypeOf(uint(0))
	Uint8   = TypeOf(uint8(0))
	Uint16  = TypeOf(uint16(0))
	Uint32  = TypeOf(uint32(0))
	Uint64  = TypeOf(uint64(0))
	Float   = TypeOf(float32(0))
	Float64 = TypeOf(float64(0))
	String  = TypeOf("")
	Bool    = TypeOf(true)
	Nil     = nilType{}
	Any     = anyType{}
)

Functions

This section is empty.

Types

type Map

type Map map[string]Type

Map represents a map[string]any type with defined keys.

func (Map) Equal

func (m Map) Equal(t Type) bool

func (Map) Nature

func (m Map) Nature() Nature

func (Map) String

func (m Map) String() string

type Type

type Type interface {
	Nature() Nature
	Equal(Type) bool
	String() string
}

Type is a type that can be used to represent a value.

func Array

func Array(of Type) Type

Array returns a type that represents an array of the given type.

func TypeOf

func TypeOf(v any) Type

Jump to

Keyboard shortcuts

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