glob

package
v3.4.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package glob implements pure-Go globbing utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Glob

type Glob struct {
	Pattern string
	Negated bool
}

func Compile

func Compile(pat string) (Glob, error)

Compile is a wrapper around NewGlobal for backwards compatibility.

func NewGlob

func NewGlob(pat string) (Glob, error)

NewGlob creates a Glob from the string pat.

func (Glob) Match

func (g Glob) Match(query string) bool

Match returns whether or not the Glob g matches the string query.

func (Glob) MatchAny added in v3.2.1

func (g Glob) MatchAny(query []string) bool

MatchAny returns whether or not the Glob g matches any of the strings in query.

Jump to

Keyboard shortcuts

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