mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
pkg/eval: Remove unneeded methods of GlobPattern.
This commit is contained in:
parent
dc564dbffb
commit
c9458344f1
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user