It's working as intended. When you say
type FooFunc func() error
The "FooFunc" type is a separate type to the "func() error" type. The
first type is named (the name is "FooFunc"), the second type is
unnamed.
When you say
var raw interface{} = foo
foo has type "func() error" and then raw's dynamic type is also "func() error".
The reason that runFoo(foo) works even though runFoo takes a "FooFunc"
and foo has type "func() error" is because "A value x is assignable to
a variable of type T if... x's type V and T have identical underlying
types and at least one of V or T is not a named type." So says
http://golang.org/ref/spec#Assignments