pkg/eval: Remove unneeded methods of GlobPattern.

This commit is contained in:
Qi Xiao 2020-04-17 00:20:30 +01:00
parent dc564dbffb
commit c9458344f1

View File

@ -3,7 +3,6 @@ package eval
import (
"errors"
"fmt"
"reflect"
"strings"
"unicode"
@ -57,23 +56,6 @@ var runeMatchers = map[string]func(rune) bool{
"upper": unicode.IsUpper,
}
func (GlobPattern) Kind() string {
return "glob-pattern"
}
func (gp GlobPattern) Equal(a interface{}) bool {
return reflect.DeepEqual(gp, a)
}
func (gp GlobPattern) Hash() uint32 {
// GlobPattern is not a first-class value.
return 0
}
func (gp GlobPattern) Repr(int) string {
return fmt.Sprintf("<GlobPattern%v>", gp)
}
func (gp GlobPattern) Index(k interface{}) (interface{}, error) {
modifierv, ok := k.(string)
if !ok {