10
// currentServiceMethodName returns the method executing on the service when ProcessControlHook was invoked.
11
func (s *TestService) currentServiceMethodName() string {
12
pc, _, _, ok := runtime.Caller(2)
14
panic("current method name cannot be found")
16
return unqualifiedMethodName(pc)
19
func unqualifiedMethodName(pc uintptr) string {
20
f := runtime.FuncForPC(pc)
22
nameParts := strings.Split(fullName, ".")
23
return nameParts[len(nameParts)-1]