Go
Mr_老冷
Done is better than perfect.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
goland重命名后配置编译报错 Module doesn't exist in project
goland重命名后配置编译报错 Module doesn't exist in project 此为goland迁移项目时Module文件未修改完全导致 找到项目目录 .idea文件夹 找到modules.xml右键编辑 将module节点的文件路径名改为新的项目文件名,保存退出 进入goland,运行-->编辑配置 Module项默认为none,改为与项目名相同的文件名 ...原创 2019-11-05 04:10:11 · 7612 阅读 · 0 评论 -
go json.Marshal序列化/解析失败的一种情况
读取mysql返回struct体数据 printf时可以打印 通过json解析一直为空 经过多方测试 发现是struct内部变量命名时被写成了小写开头 猜测: go定义内部变量/函数时,小写开头为私有,大写开头为公有,print不受影响,但调用受影响 ...原创 2019-10-22 15:33:42 · 2331 阅读 · 0 评论 -
go:cannot find main module;see 'go help modules'报错无法运行
新入手go,一通乱七八糟设置被坑以后,突然无法编译go go:cannot find main module;see 'go help modules' 经过几天的摸索,最终发现了问题所在 go modules导致 如果你确定你需要此功能 cd进入项目目录 输入go mod init 或在上层目录输入go mod init project_name 如果你不知道这是什么,方法...原创 2019-09-12 07:09:26 · 27648 阅读 · 9 评论
分享