上一页 1 2 3 4 5 6 ··· 17 下一页
摘要: 1、安装micro 需要使用GO1.11以上版本 #linux 下 export GO111MODULE=on export GOPROXY=https://goproxy.cn # 使用如下指令安装 go get -u -v github.com/micro/micro go get -u -v 阅读全文
posted @ 2019-09-05 11:21 _DongGe 阅读(634) 评论(0) 推荐(0) 编辑
摘要: 1、安装库文件protobuf,地址:https://github.com/protocolbuffers/protobuf/releases 我电脑是deepin 64位的,所以我直接下载https://github.com/protocolbuffers/protobuf/releases/do 阅读全文
posted @ 2019-09-05 10:34 _DongGe 阅读(696) 评论(0) 推荐(0) 编辑
摘要: 1、升级docker compose ,docker官方安装方法 $ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o 阅读全文
posted @ 2019-08-20 16:59 _DongGe 阅读(1999) 评论(0) 推荐(0) 编辑
摘要: docker-compose.yml 安装并运行配置 配置 1)访问http://IP:3000/ 2) 点击登录 3)更新配置: a、SSH 服务器域名:IP b、SSH Port:222 c、Gitea URL:http://IP:3000/ d、配置gitea管理员账号密码并点击安装 停止服务 阅读全文
posted @ 2019-08-14 14:13 _DongGe 阅读(1760) 评论(0) 推荐(0) 编辑
摘要: github地址:https://github.com/swaggo/gin-swagger 1、下载swag 2、在main.go所在目录执行 生成docs/doc.go以及docs/swagger.json,docs/swagger.yaml 3、下载gin-swagger 然后在路由文件引入 阅读全文
posted @ 2019-08-14 14:04 _DongGe 阅读(6068) 评论(0) 推荐(0) 编辑
摘要: 主要是获取上传文件的内容、大小、名称以及md5内容加密和sha256内容加密,网上查找的资料很少,花费了挺长时间,记录以备后用 调用方式 阅读全文
posted @ 2019-08-07 17:07 _DongGe 阅读(3306) 评论(0) 推荐(0) 编辑
摘要: func hmacSha256(data string, secret string) string { h := hmac.New(sha256.New, []byte(secret)) h.Write([]byte(data)) return hex.EncodeToString(h.Sum(nil)) } 阅读全文
posted @ 2019-08-07 17:03 _DongGe 阅读(10116) 评论(0) 推荐(0) 编辑
摘要: 定义连接超时及传输超时 封装文件上传函数(本实例采用put上传到第三方接口) 阅读全文
posted @ 2019-08-07 17:01 _DongGe 阅读(1447) 评论(1) 推荐(0) 编辑
摘要: go build的使用比较简洁,所有的参数都可以忽略,直到只有go build,这个时候意味着使用当前目录进行编译,下面的几条命令是等价的: go build 提供了跨平台编译,默认情况下,都是根据我们当前的机器生成的可执行文件,比如你的是Linux 64位,就会生成Linux 64位下的可执行文件 阅读全文
posted @ 2019-07-31 15:53 _DongGe 阅读(3110) 评论(0) 推荐(0) 编辑
摘要: 当我们使用Set时候,如果原来这一项已存在,后面的就修改已有的。所以这里最终的结果就是自定义的浏览器3 当使用Add时候,如果原本不存在,则添加,如果已存在,就不做任何修改。所以这里最终的结果就是自定义的浏览器 阅读全文
posted @ 2019-07-30 14:37 _DongGe 阅读(1755) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 17 下一页