Go面试题2
Go 面试题2 1: 下面这段代码输出什么, 说明原因: package main import "fmt" func main() { slice := []int{1,2,3} m := make(map[int]*int) for key, val := range slice { m[key] = &val } for k, v := range m{ fmt.Println(k, "-->", *v) } } 参考答案及解析 1: 答案以及解
Posted by "" on Wednesday, December 11, 2019