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 · 2959 阅读 · 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 · 1152 阅读 · 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 · 3800 阅读 · 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# 设置GO111MOUDLEexport GO111MODULE=on windows系统# 注意需要加上引号# 设置goproxy.io代理go env -w GOPROXY="https://goproxy.io"# 设置GO111MOUDLEgo en原创 2021-08-25 17:39:42 · 2457 阅读 · 1 评论