mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-13 12:48:02 +00:00
18 lines
311 B
Go
18 lines
311 B
Go
package render
|
|
|
|
import (
|
|
"reflect"
|
|
"runtime"
|
|
)
|
|
|
|
func functionName(i interface{}) string {
|
|
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
|
|
}
|
|
|
|
func typeName(i interface{}) string {
|
|
if m, ok := i.(*memoise); ok {
|
|
return "memoise:" + typeName(m.Renderer)
|
|
}
|
|
return reflect.TypeOf(i).String()
|
|
}
|