![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Go
文章平均质量分 58
citi
山东大学计算机本硕
曾就职于美团基础架构部
现快手容器云研发工程师
展开
-
【MAC】【Golang】The selected directory is not a valid home for Go SDK 问题解决
The selected directory is not a valid home for Go SDK mac 系统解决方法原创 2022-06-27 20:26:21 · 941 阅读 · 0 评论 -
golang panic: assignment to entry in nil map
目录 Golang中,内建map切忌开箱即用 嵌套场景 golang中的map不是并发安全的 如何解决 或许你可以尝试下sync.Map 引用 Golang中,内建map切忌开箱即用 Golang中,map是引用类型,如指针切片一样,通过下面的代码声明后指向的是nil。这点在golang官方文档中也说明了,所以千万别直接声明后就使用,开始可能经常会犯下面的错: var m map[string]string m["result"] = "result" 上面的第一行代码并没有对...原创 2021-05-17 15:54:39 · 1912 阅读 · 0 评论 -
fatal: could not read Username for ‘https://XXX.com‘: terminal prompts disabled
原因:go get 默认使用https拉取源码,会因为校验用户名密码而失败 解决方案: 通过git config 切换https验证转换为ssh验证 以GitHub为例: git config --global --add url."git@github.com:".insteadOf "https://github.com/" 私有库 https://XXX.com git config --global --add url."git@XXX.com:".insteadOf "https:原创 2021-04-19 18:04:41 · 3189 阅读 · 0 评论