Исходники и презентации
This commit is contained in:
10
lessons/slices_and_arrays/copy_slice/main.go
Normal file
10
lessons/slices_and_arrays/copy_slice/main.go
Normal file
@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
src := []int{1, 2, 3}
|
||||
var dst []int
|
||||
copy(dst, src)
|
||||
fmt.Println("copied:", dst)
|
||||
}
|
||||
Reference in New Issue
Block a user