It works if you’re using the signature. There’s no pointer.
type HelloFunc func(string)
func SayHello(to string) {
fmt.Printf("Hello, %s!\n", to)
}
func main() {
var hf HelloFunc
hf = SayHello
hf("world")
}
Alternatively you can use the function signature directly, without declaring a new type.