Versions in this module Expand all Collapse all v0 v0.0.2 Jun 10, 2024 Changes in this version + var ErrMatchFailed = fmt.Errorf("failed to match between args and prefixes") + var ErrNotFound = fmt.Errorf(...) v0.0.1 Jun 10, 2024 Changes in this version + var ErrContextUntypedNil = fmt.Errorf("context.Context is untyped nil") + var ErrNoFunctionRegistered = fmt.Errorf("no function registered") + type DotPrefix string + func (p DotPrefix) Match(s string) bool + func (p DotPrefix) Strip(s string) string + type InvalidFunctionError struct + Func any + Prefix Prefix + Type string + func (e InvalidFunctionError) Error() string + type LookupAny func(val string) (any, bool) + func Func[R any](fn func(val string) (R, bool)) LookupAny + type LookupAnyWithContext func(ctx context.Context, val string) (any, bool) + func FuncWithContext[R any](fn func(ctx context.Context, val string) (R, bool)) LookupAnyWithContext + type LookupAnyWithContextError func(ctx context.Context, val string) (any, bool, error) + func FuncWithContextError[R any](fn func(ctx context.Context, val string) (R, bool, error)) LookupAnyWithContextError + type LookupAnyWithError func(val string) (any, bool, error) + func FuncWithError[R any](fn func(val string) (R, bool, error)) LookupAnyWithError + type LookupFunc interface + type MatchFailedError struct + Args []string + Prefixes []string + func (e MatchFailedError) Error() string + type MultiLookup map[Prefix]LookupFunc + func (m MultiLookup) BindContext(ctx context.Context) *MultiLookupContext + func (m MultiLookup) FuncMapValue(args ...string) (any, error) + func (m MultiLookup) Validate() error + type MultiLookupContext struct + Ctx context.Context + MultiLookup MultiLookup + func (m *MultiLookupContext) FuncMapValue(args ...string) (any, error) + func (m *MultiLookupContext) Validate() error + type Prefix interface + Match func(string) bool + Strip func(string) string + type SlashPrefix string + func (p SlashPrefix) Match(s string) bool + func (p SlashPrefix) Strip(s string) string