On Wednesday, October 24, 2012 2:41:44 AM UTC+3,
simon...@googlemail.com wrote:
(this is from a while back, i didn't post before because i wanted to try to find a fix.)
This may be explaining a few things, perhaps:
package main
import "fmt"
func main() {
x := []int{9, 1, 2} // a slice of int: []int
s := make([]interface{}, len(x)) // a slice of interface{}: []interface{}
for i, v := range x { // make every int an interface{}
s[i] = v
}
fmt.Println("x = ", x)
fmt.Printf("s... : s[0] = %v\t s[1] = %v\t s[2] = %v\n", s...)
}