globpath

package
v1.40.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 5 Imported by: 0 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

This section is empty.

Types

type GlobPath

type GlobPath struct {
	HasSuperMeta bool
	// contains filtered or unexported fields
}

func Compile

func Compile(path string) (*GlobPath, error)

func (*GlobPath) GetRoots

func (g *GlobPath) GetRoots() []string

GetRoots returns a list of files and directories which should be optimal prefixes of matching files when you have a super-meta in your expression : - any directory under these roots may contain a matching file - no file outside of these roots can match the pattern Note that it returns both files and directories. All returned path will have the host platform separator.

func (*GlobPath) Match

func (g *GlobPath) Match() []string

Match returns all files matching the expression. If it's a static path, returns path. All returned path will have the host platform separator.

func (*GlobPath) MatchString

func (g *GlobPath) MatchString(path string) bool

MatchString tests the path string against the glob. The path should contain the host platform separator.

Jump to

Keyboard shortcuts

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