I was learning about pointers in Go. And managed to write something like:
func hello(){ fmt.Println(\"Hello World\") } func main(){ pfunc := hel
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.