wildmatch

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package wildmatch implements Git's wildmatch.c semantics in Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(pattern, text string, pathname bool) bool

Match reports whether text matches pattern. If pathname==true, '/' is special and only matched by '**' in special positions, never by '*' or '?'.

func MatchOpt

func MatchOpt(pattern, text string, opt WMOptions) bool

MatchOpt matches text against pattern with explicit options.

Types

type WMOptions

type WMOptions struct {
	// Pathname: treat '/' as a directory separator with special handling.
	Pathname bool
	// CaseFold: enable ASCII-only case-insensitive matching.
	CaseFold bool
}

WMOptions are options for MatchOpt.

Jump to

Keyboard shortcuts

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