摘要: 本地git ssh与网页中的git ssh不一致导致的 解决步骤: 1、ls ~/.ssh 查看有本地有没有.pub文件,有的话会显示如下: id_rsa id_rsa.pub known_hosts 由于我电脑中已经有.pub文件就不重复生成了,有需要可以参考https://www.cnblogs 阅读全文
posted @ 2022-02-13 23:37 雪糕战士 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 安装: go install github.com/fullstorydev/grpcui/cmd/grpcui@latest 启动: grpcui -plaintext 端口号 例子:grpcui -plaintext 127.0.0.1:9000 添加请求信息key value 格式,服务通过元 阅读全文
posted @ 2022-01-04 20:24 雪糕战士 阅读(401) 评论(0) 推荐(0) 编辑
摘要: func CreateGreeter() error { var mu sync.Mutexgroup := new(errgroup.Group) var info []biz.Info m := make(map[string]string) userlist := []string{"User 阅读全文
posted @ 2022-01-01 12:36 雪糕战士 阅读(99) 评论(0) 推荐(0) 编辑
摘要: c.Database.Source格式:server=127.0.0.1;user id=SA;password=Pwd123456;port=1433;database=master;encrypt=disable DB, err := gorm.Open(sqlserver.Open(c.Dat 阅读全文
posted @ 2021-12-26 11:41 雪糕战士 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 最简单的办法:使用copier库 copier.Copy(&A, &B) // 将B切片赋值给A切片 参考这个博客:https://darjun.github.io/2020/03/13/godailylib/copier/ 使用for循环方法: 我使用sqlx查询数据库数据,查询结果如下: 我想通 阅读全文
posted @ 2021-09-27 17:24 雪糕战士 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 引入相对文件报错 "open ./permission/rbac_models.conf: The system cannot find the path specified." casbin.NewEnforcer("./permission/rbac_models.conf", a)修改为 My 阅读全文
posted @ 2021-09-23 00:07 雪糕战士 阅读(237) 评论(0) 推荐(0) 编辑
摘要: panic: interface conversion: *gormadapter.Adapter is not persist.Adapter: missing method LoadPolicy casbin引入切换为 "github.com/casbin/casbin/v2" 阅读全文
posted @ 2021-09-23 00:04 雪糕战士 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 转载自:https://segmentfault.com/a/1190000039754673 # 设置 mod 模式和代理go env -w GO111MODULE=ongo env -w GOPROXY=https://goproxy.cn,https://proxy.golang.org,di 阅读全文
posted @ 2021-08-14 17:34 雪糕战士 阅读(399) 评论(0) 推荐(0) 编辑
摘要: protoc-gen-go: unable to determine Go import path for "person.proto" Please specify either: • a "go_package" option in the .proto source file, or • a 阅读全文
posted @ 2021-08-10 22:52 雪糕战士 阅读(1554) 评论(0) 推荐(0) 编辑
摘要: git地址:https://github.com/skyhee/gin-doc-cn 执行后提示: Cloning into 'D:\GO\src\github.com\gin-gonic\gin'...error: RPC failed; curl 56 OpenSSL SSL_read: Con 阅读全文
posted @ 2021-06-21 16:21 雪糕战士 阅读(731) 评论(0) 推荐(0) 编辑