how to invoke a method with below signature
SomeFunc( args ...interface{})
with variable of type []interface{}
Is it possible to invoke the above method? If yes how?
Thanks
how to invoke a method with below signature
SomeFunc( args ...interface{})
with variable of type []interface{}
Is it possible to invoke the above method? If yes how?
Thanks
func main() {
b := []interface{}{"hello", "Hi"}
SomeFunc(b...)
}
Solved the issue by using ...
after b array.
For more details plz see Unpacking slice of slices and Golang Join array interface