This commit is contained in:
crusader 2018-03-21 21:31:37 +09:00
parent e216cb7671
commit e1da1222c6

View File

@ -2,6 +2,7 @@ package registry
import (
"fmt"
"log"
"reflect"
"runtime"
"strings"
@ -48,7 +49,7 @@ func RegisterType(t reflect.Type) error {
pc, _, _, ok := runtime.Caller(1)
details := runtime.FuncForPC(pc)
if ok && details != nil {
return fmt.Errorf("called from %s", details.Name())
log.Printf("called from %s", details.Name())
}
return registry.RegisterType(t)