开头没有 package main import "fmt"
package main
import "fmt"
func main() {
var numbers4 = [...]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
slice5 := numbers4[4:6:8]
length := (2)
capacity := (4)
fmt.Printf("%v, %v\n", length == len(slice5), capacity == cap(slice5))
slice5 = slice5[:cap(slice5)]
slice5 = append(slice5, 11, 12, 13)
length = (7)
fmt.Printf("%v\n", length == len(slice5))
slice6 := []int{0, 0, 0}
copy(slice5, slice6)
e2 := (0)
e3 := (8)
e4 := (11)
fmt.Printf("%v, %v, %v\n", e2 == slice5[2], e3 == slice5[3], e4 == slice5[4])
}
/*卡了个把小时,开头没有
package main
import "fmt"
所以运行会出现如下信息,
package main:
../mfs/usercode/golang/7416881/7514/index.go:1:1: expected 'package', found 'func*/