mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
15 lines
150 B
Go
15 lines
150 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
a := []int{10, 20, 30}
|
|
b := [4]int{}
|
|
c := b[:]
|
|
copy(c, a)
|
|
fmt.Println(c)
|
|
}
|
|
|
|
// Output:
|
|
// [10 20 30 0]
|