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

pathscope

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pathscope owns repository-relative path normalization and matching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPrefix

func HasPrefix(candidate, prefix string) bool

HasPrefix reports segment-aware membership under a normalized prefix.

func MatchGlob

func MatchGlob(pattern, candidate string) bool

MatchGlob applies a normalized glob to a repository-relative slash path.

func NormalizeGlob

func NormalizeGlob(value string) (string, error)

NormalizeGlob validates the deliberately small repository glob grammar. Recursive ** is supported only as an entire segment; other segments use literal characters plus * and ?.

func NormalizePrefix

func NormalizePrefix(value string) (string, error)

NormalizePrefix validates and canonicalizes one repository-relative segment prefix. The returned value never has a leading or trailing slash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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