1package match 2 3import ( 4 "fmt" 5) 6 7type Nothing struct{} 8 9func NewNothing() Nothing { 10 return Nothing{} 11} 12 13func (self Nothing) Match(s string) bool { 14 return len(s) == 0 15} 16 17func (self Nothing) Index(s string) (int, []int) { 18 return 0, segments0 19} 20 21func (self Nothing) Len() int { 22 return lenZero 23} 24 25func (self Nothing) String() string { 26 return fmt.Sprintf("<nothing>") 27} 28