Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
agiledragon committed Oct 18, 2021
1 parent d6a7b1a commit 247bfea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion creflect/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type funcValue struct {
func funcPointer(v reflect.Method, ok bool) (unsafe.Pointer, bool) {
return (*funcValue)(unsafe.Pointer(&v.Func)).p, ok
}
func AllMethodByName(r reflect.Type, name string) (fn unsafe.Pointer, ok bool) {
func MethodByName(r reflect.Type, name string) (fn unsafe.Pointer, ok bool) {
t := Create(r)
if r.Kind() == reflect.Interface {
return funcPointer(r.MethodByName(name))
Expand Down
2 changes: 1 addition & 1 deletion patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (this *Patches) ApplyMethod(target reflect.Type, methodName string, double
}

func (this *Patches) ApplyPrivateMethod(target reflect.Type, methodName string, double interface{}) *Patches {
m, ok := creflect.AllMethodByName(target, methodName)
m, ok := creflect.MethodByName(target, methodName)
if !ok {
panic("retrieve method by name failed")
}
Expand Down

0 comments on commit 247bfea

Please sign in to comment.