expr

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeaderValue

func HeaderValue(header http.Header, name string) any

HeaderValue returns the single header value when exactly one exists, the value slice for repeated headers, and an empty string when the header is absent.

func RequestValue

func RequestValue(r *http.Request, name string) any

func SnapshotValue

func SnapshotValue(snapshot base.LogSnapshot, name string) any

SnapshotValue preserves RequestValue semantics after the live request has been detached for log and finalizer callbacks.

func String

func String(value any) string

Types

type Expression

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

func Compile

func Compile(value any) (*Expression, error)

func (*Expression) Eval

func (e *Expression) Eval(resolve Resolver) bool

type Resolver

type Resolver func(name string) any

Jump to

Keyboard shortcuts

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