An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/becheran/wildmatch-go

Package wildmatch used to match strings against a simple wildcard pattern. Tests a wildcard pattern `p` against an input string `s`. Returns true only when `p` matches the entirety of `s`. See also the example described on [wikipedia](https://en.wikipedia.org/wiki/Matching_wildcards) for matching wildcards. No escape characters are defined. - `?` matches exactly one occurrence of any character. - `*` matches arbitrary many (including zero) occurrences of any character. Examples matching wildcards: ``` go import "github.com/becheran/wildmatch-go" wildmatch.NewWildMatch("cat").IsMatch("cat") wildmatch.NewWildMatch("*cat*").IsMatch("dog_cat_dog") wildmatch.NewWildMatch("c?t").IsMatch("cat") wildmatch.NewWildMatch("c?t").IsMatch("cot") ``` Examples not matching wildcards: ``` go import "github.com/becheran/wildmatch-go" wildmatch.NewWildMatch("dog").IsMatch("cat") wildmatch.NewWildMatch("*d").IsMatch("cat") wildmatch.NewWildMatch("????").IsMatch("cat") wildmatch.NewWildMatch("?").IsMatch("cat") ```
3 versions
Latest release: over 4 years ago
185 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/becheran/wildmatch-go

Dependent Repos 0