Help us shape the future of Go! Take the 2026 Go Developer Survey

glob

package
v3.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 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
	// contains filtered or unexported fields
}

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

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