pathmatcher

package
v0.0.0-...-85aee89 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ant

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

Ant 路径匹配

func NewAntPathMatcher

func NewAntPathMatcher() *Ant

NewAntPathMatcher 实例化

func (*Ant) Match

func (a *Ant) Match(pattern string, path string) bool

Match 匹配 /** 匹配所有 /a/** 匹配 /a/b, /a, /a/b/c /a/*/b 匹配 /a/c/b /a/**/b 匹配 /a/c/b, /a/cs/d/b 该方法不处理 /a/**/b/**/c多个**的情况,该路径视为/a/**/c

type PathMatcher

type PathMatcher interface {
	// 匹配
	Match(pattern string, path string) bool
}

PathMatcher 路径匹配器

Jump to

Keyboard shortcuts

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