package main import "fmt" var x = []int{2: 5, 6, 0: 7} func main() { fmt.Printf("%+v",x) // [7 0 5 6] for index, value := range x { fmt.Printf("Index: %d Value: %d\n", index, value) } }
go数组 显示数组键名与键值
阅读:3675 输入:2020-11-24 14:13:50
- 上一篇:QUIC源码分析CHLO
- 下一篇:滑动窗口中swnd、rwnd与cwnd的区别