types

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 4 Imported by: 11 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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