summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gobwas/glob/match/nothing.go
blob: 0d4ecd36b80b2bcfdb6cedf1e208c1ac1b3c19de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package match

import (
	"fmt"
)

type Nothing struct{}

func NewNothing() Nothing {
	return Nothing{}
}

func (self Nothing) Match(s string) bool {
	return len(s) == 0
}

func (self Nothing) Index(s string) (int, []int) {
	return 0, segments0
}

func (self Nothing) Len() int {
	return lenZero
}

func (self Nothing) String() string {
	return fmt.Sprintf("<nothing>")
}