expr

package
v0.1.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 QueryArgument

func QueryArgument(raw, name string) (string, bool)

QueryArgument implements nginx $arg_name: the first case-insensitive name= pair, without percent decoding or treating a semicolon as a separator.

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