parser

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtxFunction

type CtxFunction[T any, U any] func(context.Context, U) (T, error)

func (CtxFunction[T, U]) Parse

func (pcf CtxFunction[T, U]) Parse(ctx context.Context, input U) (T, error)

type Function

type Function[T any, U any] func(U) (T, error)

func (Function[T, U]) Parse

func (pf Function[T, U]) Parse(input U) (T, error)

type Parser

type Parser[T any, U any] interface {
	Parse(U) (T, error)
}

func New

func New[T any, U any](fn func(U) (T, error)) Parser[T, U]

type ParserCtx

type ParserCtx[T any, U any] interface {
	Parse(context.Context, U) (T, error)
}

func NewCtx

func NewCtx[T any, U any](fn func(context.Context, U) (T, error)) ParserCtx[T, U]

Jump to

Keyboard shortcuts

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