[Solved] What are function pointers good for in Go if you can’t assign them values?


You can’t take the address of a function definition, you can take the address of a function value. This works:

g := &f

Playground example: https://play.golang.org/p/BokYCrVmV_p

solved What are function pointers good for in Go if you can’t assign them values?