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

glob

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package glob matches request IDs, JSON paths and routes against simple patterns: '*' matches any run of characters (including none), '?' matches one character, and everything else, brackets included, matches itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Literal

func Literal(pattern string) (prefix, suffix string)

Literal returns the start and the end of pattern around its wildcards: every name the pattern matches starts with prefix and ends with suffix. A pattern without wildcards is both.

func Match

func Match(pattern, name string) bool

Match reports whether name matches pattern.

Types

This section is empty.

Jump to

Keyboard shortcuts

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