id

package
v0.0.0-...-5a4f27c Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustParse

func MustParse[I ID, PI SubtypePtr[I]](id string) I

MustParse parses a string representation of an ID into the specified ID type and panics if it cannot be parsed.

func New

func New[I ID, PI SubtypePtr[I]]() I

New creates a new instance of the specified ID type. It panics if the ID cannot be generated.

func Parse

func Parse[I ID, PI SubtypePtr[I]](id string) (I, error)

Parse parses a string representation of an ID into the specified ID type.

Types

type ID

type ID interface {
	typeid.Subtype
	comparable
	IsZero() bool
}

type SubtypePtr

type SubtypePtr[T any] = typeid.SubtypePtr[T]

Jump to

Keyboard shortcuts

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