摘要: 网页浏览端口,https端口号是443,http端口号是80 阅读全文
posted @ 2020-11-09 15:12 TR_Goldfish 阅读(608) 评论(0) 推荐(0) 编辑
摘要: 包sort中有关切片排序的函数分为两种: func Slice func SliceStable 1,2的参数都是一样的,建议用2(官方说更稳定) func SliceStable(slice interface{}, less func(i int, j int) bool)有两个参数: 第一个: 阅读全文
posted @ 2020-11-09 13:55 TR_Goldfish 阅读(1202) 评论(0) 推荐(0) 编辑
摘要: make定义二维切片 注:make定义二维切片时,第二个长度必须指定 // 初始化: res := make([][length]int, length), // 例如: res := make([][2]int, 10) fmt.Println(res) // 输出: [[0 0] [0 0] [ 阅读全文
posted @ 2020-11-09 13:21 TR_Goldfish 阅读(188) 评论(0) 推荐(0) 编辑