I am unable to understand why copy is not copying the slice contents below.
http://play.golang.org/p/4Ag7Bmw7q2
package main
import "fmt"
func main() {
a := make([]int, 0, 10)
a = append(a, 1)
fmt.Println(a)
b := make([]int, 0, 10)
fmt.Println(copy(b, a))
fmt.Println(b)
}
Can someone explain if this is the intended behavior or is it a bug ?
Sankar
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/72324abd-6805-40d0-a7b0-042433568fdb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.