Is there a way to declare an array (or slice) that is indexed by a type derived from int, rather than indexed by int? My intent is to have the compiler complain if I index the array/slice with a generic int rather than the specific int-derived type I'm supposed to use. This will help verify correct usage of the array. I didn't see any way to do this in the language spec, but hopefully I just missed it?
Thanks, Steve -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.