...
Documentation
Documentation

# Package wildcard

## Overview ▹

## Overview ▾

## Index ▹

## Index ▾

### Package files

match.go

## func Index ¶

    func Index(pattern, name string) (index int)

Index - finds a position of substring which matches/satisfies the pattern string. Supports '*' and '?' wildcards in the pattern string. If nothing is found, it returns -1.

## func Match ¶

    func Match(pattern, name string) (matched bool)

Match - finds whether the text matches/satisfies the pattern string. supports '*' and '?' wildcards in the pattern string. unlike path.Match(), considers a path as a flat name space while matching the pattern. The difference is illustrated in the example here https://play.golang.org/p/Ega9qgD4Qz .

## func MatchSimple ¶

    func MatchSimple(pattern, name string) bool

MatchSimple - finds whether the text matches/satisfies the pattern string. supports only '*' wildcard in the pattern. considers a file system path as a flat name space.