mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
15 lines
192 B
Go
15 lines
192 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
a := []int{1, 2}
|
|
b := [2]int{3, 4}
|
|
fmt.Println(append(a, b[:]...))
|
|
fmt.Println(append(a, []int{5, 6}...))
|
|
}
|
|
|
|
// Output:
|
|
// [1 2 3 4]
|
|
// [1 2 5 6]
|