brace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: BlueOak-1.0.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExpansionMax is the default cap on the number of expansion results.
	// TypeScript brace-expansion: EXPANSION_MAX = 100_000
	// Also Options DefaultBraceExpandMax.
	ExpansionMax = 100_000

	// ExpansionMaxLength caps total characters held across all results in
	// the accumulator (CVE-2026-14257 mitigation).
	// TypeScript: EXPANSION_MAX_LENGTH = 4_000_000
	ExpansionMaxLength = 4_000_000
)

Expansion limits matching brace-expansion@5 (used by minimatch).

Variables

This section is empty.

Functions

func Expand

func Expand(pattern string, max, maxLength int) []string

Expand runs brace-expansion expand(str, {max, maxLength}). Does not validate pattern length or honor nobrace (caller handles that).

func HasSimpleGroup

func HasSimpleGroup(pattern string) bool

HasSimpleGroup is the ReDoS-safe `{…}` pre-check used by minimatch.braceExpand.

Types

This section is empty.

Jump to

Keyboard shortcuts

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