
go
Jeson是只程序猿
这个作者很懒,什么都没留下…
展开
-
Linux安装 GRPC详解
一、安装protoc 进入https://github.com/protocolbuffers/protobuf/releases挑选需要的包 小编用的linux的 下载完后上传到服务器解压 执行如下命令 安装完毕检查是否安装成功 protoc --version 这里有版本号就是成功了二、安装grpc 执行如下命令 三、安装protoc-gen-go 执行如下命令 在$GOPATH/bin下会生成对应二进制......原创 2022-06-14 09:59:41 · 3168 阅读 · 0 评论 -
go语言string、int、int64互相转换
//string到int int,err:=strconv.Atoi(string) //string到int64 int64, err := strconv.ParseInt(string, 10, 64) //int到string string:=strconv.Itoa(int) //int64到string string:=strconv.FormatInt(int64,10)原创 2021-09-27 12:00:59 · 1185 阅读 · 0 评论 -
golang || gin运行,出现类似这种的错误: missing go.sum entry; to add it:
go: github.com/gin-gonic/gin@v1.7.4: missing go.sum entry; to add it: go mod download github.com/gin-gonic/gin 请使用如下命令修复: go mod tidy 执行完会重新下载第三方包,然后在重新运行,就不会报错了原创 2021-08-31 09:49:25 · 3979 阅读 · 0 评论 -
安装gin失败,或者卡住,或者cannot find module providing package github.com/gin-gonic/gin: 安装gin后找不到gin包
安装gin失败,或者卡住 在Go 1.11版本后,支持go mod和包下载解决方案,以下是解决方法 mac/linux系统: # 设置goproxy.io代理 export GOPROXY=https://goproxy.io # 设置GO111MOUDLE export GO111MODULE=on windows系统 # 注意需要加上引号 # 设置goproxy.io代理 go env -w GOPROXY="https://goproxy.io" # 设置GO111MOUDLE go en原创 2021-08-25 17:39:42 · 2626 阅读 · 1 评论