This commit is contained in:
Panagiotis Koursaris 2022-03-10 16:53:23 +02:00 committed by Anthony Fok
parent 48c98a8d24
commit a461e9d01a

View file

@ -128,7 +128,7 @@ type methods struct {
var methodCache = &methods{cache: make(map[methodKey]int)} var methodCache = &methods{cache: make(map[methodKey]int)}
// GetMethodByName is the samve as reflect.Value.MethodByName, but it caches the // GetMethodByName is the same as reflect.Value.MethodByName, but it caches the
// type lookup. // type lookup.
func GetMethodByName(v reflect.Value, name string) reflect.Value { func GetMethodByName(v reflect.Value, name string) reflect.Value {
index := GetMethodIndexByName(v.Type(), name) index := GetMethodIndexByName(v.Type(), name)