Commit 12782426 authored by Steven Allen's avatar Steven Allen

nit: avoid ValueOf

We only need TypeOf.
parent 9c3fe058
...@@ -230,9 +230,9 @@ func newNode(typ reflect.Type) *node { ...@@ -230,9 +230,9 @@ func newNode(typ reflect.Type) *node {
} }
func (n *node) emit(event interface{}) { func (n *node) emit(event interface{}) {
eval := reflect.ValueOf(event) typ := reflect.TypeOf(event)
if eval.Type() != n.typ { if typ != n.typ {
panic(fmt.Sprintf("Emit called with wrong type. expected: %s, got: %s", n.typ, eval.Type())) panic(fmt.Sprintf("Emit called with wrong type. expected: %s, got: %s", n.typ, typ))
} }
n.lk.RLock() n.lk.RLock()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment