本站源代码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

28 行
371B

  1. package match
  2. import (
  3. "fmt"
  4. )
  5. type Nothing struct{}
  6. func NewNothing() Nothing {
  7. return Nothing{}
  8. }
  9. func (self Nothing) Match(s string) bool {
  10. return len(s) == 0
  11. }
  12. func (self Nothing) Index(s string) (int, []int) {
  13. return 0, segments0
  14. }
  15. func (self Nothing) Len() int {
  16. return lenZero
  17. }
  18. func (self Nothing) String() string {
  19. return fmt.Sprintf("<nothing>")
  20. }
上海开阖软件有限公司 沪ICP备12045867号-1