matrix-pretix/vendor/maunium.net/go/mautrix/pushrules/glob
Luca 4fb9fa2060
continuous-integration/drone/push Build is passing Details
Vendorize dependencies
2022-07-25 02:32:08 +02:00
..
LICENSE Vendorize dependencies 2022-07-25 02:32:08 +02:00
README.md Vendorize dependencies 2022-07-25 02:32:08 +02:00
glob.go Vendorize dependencies 2022-07-25 02:32:08 +02:00

README.md

String globbing in Go

GoDoc

This package adds support for globs in Go.

It simply converts glob expressions to regexps. I try to follow the standard defined here.

Example

package main

import "github.com/zyedidia/glob"

func main() {
    glob, err := glob.Compile("{*.go,*.c}")
    if err != nil {
        // Error
    }

    glob.Match([]byte("test.c"))   // true
    glob.Match([]byte("hello.go")) // true
    glob.Match([]byte("test.d"))   // false
}

You can call all the same functions on a glob that you can call on a regexp.