I have an array (coming from JSON) that always contains a string and an int, like so: ["foo",42]
Right now, I have to use []interface{} with assertions arr[0].(string) arr[1].(int)
I'm wondering if there's any way to specify the types expected in the array? I'm picturing something like.. [...]{string,int}
Thanks.
UnmarshalJSONmethod (so that it can handle the[]vs{}difference)?