1.runtime error: invalid memory address or nil pointer dereference
这个错误源于对空指针取值,用到指针的地方要判断是否为nil
2.import cycle not allowed
循环导入包
3.今天导入一个之前导入正常的项目一直报working directory is not part of a module错误
错误根本原因是找不到module,就是导入包的路径不对。主要原因是在其他项目中使用了mod这个,导致之前的项目也走了mod的路径而没有走GOPATH路径,正确方法就是关闭这个export GO111MODULE=off,就能走之前的了。gomod有很多种用处,后面慢慢了解吧
4.panic: assignment to entry in nil map
直接向nilmap赋值报错