mirrors

package
v0.0.0-...-9900226 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExistsAlready = errors.New("present already")
View Source
var ErrNoId = errors.New("no id present")

Functions

func Empty

func Empty[T any]() T

func TryGetLiteral

func TryGetLiteral(t reflect.Type) (string, bool)

func TypeOf

func TypeOf[T any]() reflect.Type

Types

type TypeId

type TypeId uint64

func Add

func Add[T any](m TypeMap) TypeId

func IdOf

func IdOf[T any](m TypeMap) (TypeId, error)

type TypeMap

type TypeMap map[reflect.Type]TypeId

func (TypeMap) Add

func (m TypeMap) Add(t reflect.Type) TypeId

func (TypeMap) IdOf

func (m TypeMap) IdOf(t reflect.Type) (TypeId, error)

type TypedStrings

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

func NewTypedStrings

func NewTypedStrings() TypedStrings

func (TypedStrings) InstanceOf

func (t TypedStrings) InstanceOf(s string) any

func (TypedStrings) Typed

func (t TypedStrings) Typed(s string) reflect.Type

Jump to

Keyboard shortcuts

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