There are two ways, one is to use reflection, the other would be to use unsafe
to convert the slice value into another structure then extract the length
field.
Assuming that you could write a Len function as you specified, what would you
do next? What problem are you trying to solve?
--
You
How would someone create a function like len ?
func Len(s []interface{}) would not work because compiler complains of
type mismatch if you call it with an integer slice (for example)
Thanks
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To