package glob

import "cuelang.org/go/internal/golangorgx/gopls/test/integration/fake/glob"

Package glob implements an LSP-compliant glob pattern matcher for testing.

Index

Types

type Glob

type Glob struct {
	// contains filtered or unexported fields
}

A Glob is an LSP-compliant glob pattern, as defined by the spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#documentFilter

NOTE: this implementation is currently only intended for testing. In order to make it production ready, we'd need to:

Quoting from the spec: Glob patterns can have the following syntax:

Expanding on this:

func Parse

func Parse(pattern string) (*Glob, error)

Parse builds a Glob for the given pattern, returning an error if the pattern is invalid.

func (*Glob) Match

func (g *Glob) Match(input string) bool

Match reports whether the input string matches the glob pattern.

func (*Glob) String

func (g *Glob) String() string

Source Files

glob.go

Version
v0.12.0 (latest)
Published
Jan 30, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
8 hours ago

Tools for package owners.