On Fri, Nov 10, 2017 at 10:27 AM, Trig <[email protected]> wrote:
> Is it possible to have an interface{} as type []interface{}?
Yep, you can store a slice of interface{} in an interface{}
eg.
// interface{} holding an []interface{} holding ints
var a interface{} = []interface{}{1,2,3,4,5}
https://play.golang.org/p/xo3gLWdUFG
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.