I want to store a function with any parameters in an interface{}
and be able to run it elsewhere.
So it could store a func(string) string
or a func(int, int) string
or etc, but I need to be able to call it later and be able to tell it what type of function it is. I tried to use .(func(string) string)
and .(func(int,int) string)
, but got nothing.
Any help is appreciated.