随笔分类 -  golang

drone 编译问题
摘要:drone-server 编译 编译命令: go install -tags "oss nolimit" github.com/drone/drone/cmd/drone-server 编译命令: go install github.com/drone/drone/cmd/drone-server 阅读全文

posted @ 2022-01-19 09:46 正义的伙伴! 阅读(680) 评论(0) 推荐(0) 编辑

consul 相关
摘要:https://www.cnblogs.com/java-zhao/p/5387105.html # 启动 consul consul agent -server -bootstrap-expect 1 -data-dir=/data/ -config-dir=config/ -bind=192.1 阅读全文

posted @ 2021-08-03 11:17 正义的伙伴! 阅读(27) 评论(0) 推荐(0) 编辑

elementui 发送时间格式到 gin 后端问题
摘要:elementui 前端需要配置 timeFormat: yyyy-MM-ddTHH:mm:ssZ 这样就可以了 <el-date-picker v-model="request.minTime" placeholder="最小时间" type="datetime" :value-format="t 阅读全文

posted @ 2021-05-28 18:44 正义的伙伴! 阅读(199) 评论(1) 推荐(0) 编辑

go mod 说明
摘要:module test-12345 go 1.15 require ( vender.go-util v0.0.0 // 必须是三个点 v0.0.0 这种格式!! ) replace ( vender.go-util => ./vender/go-util // 子模块依赖的包替换. 加入 子组件有 阅读全文

posted @ 2021-03-01 11:45 正义的伙伴! 阅读(90) 评论(0) 推荐(0) 编辑

go 信号捕获
摘要:Golang中的信号处理 chanel := make(chan os.Signal) // SIGKILL 无法捕获 ! signal.Notify(chanel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGKILL) s := <-chanel lo 阅读全文

posted @ 2020-12-17 14:45 正义的伙伴! 阅读(461) 评论(0) 推荐(0) 编辑

windows 安装 make
摘要:第一步: 打开 : https://mirror.tuna.tsinghua.edu.cn/help/msys2/ 下载 mysy2.zip 并且 按步骤 配置 好 镜像 第二步: 打开 mingw64.exe , 首先安装 密钥, 否则 可能有问题 (错误:mingw32: 密钥 "******* 阅读全文

posted @ 2020-11-05 10:08 正义的伙伴! 阅读(1648) 评论(0) 推荐(0) 编辑

toml 语法
摘要:原文地址:https://aofei.org/posts/2017-03-20-toml TOML 语法规范 2017-03-20 16:45:58 TOML 全称:Tom’s Obvious, Minimal Language 作者:Tom Preston-Werner 最新版本:v0.4.0 注 阅读全文

posted @ 2020-11-05 08:34 正义的伙伴! 阅读(1439) 评论(0) 推荐(0) 编辑

go lang AES 加密
摘要:golang 加密解密 golang 加密解密 package main import ( "bytes" "crypto/aes" "crypto/cipher" "encoding/base64" "errors" "fmt" ) //高级加密标准(Adevanced Encryption St 阅读全文

posted @ 2020-10-29 11:10 正义的伙伴! 阅读(2465) 评论(0) 推荐(0) 编辑

go mod 代理
摘要:# cmd 执行 下面的代码 go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct # 不代理的网址 设置GOPRIVATE来跳过私有库,比如常用的Gitlab或Gitee,中间使用逗号分隔: go env -w G 阅读全文

posted @ 2020-09-15 10:40 正义的伙伴! 阅读(280) 评论(0) 推荐(0) 编辑

go 字符串转换
摘要:Go语言json编码驼峰转下划线、下划线转驼峰 目录 一、需求 二、实现 三、使用 JsonSnakeCase统一转下划线json JsonCamelCase统一转驼峰json 一、需求 golang默认的结构体json转码出来,都是根据字段名生成的大写驼峰格式,但是一般我们最常用的json格式是小 阅读全文

posted @ 2020-08-31 17:44 正义的伙伴! 阅读(859) 评论(0) 推荐(0) 编辑

golang 程序异常处理
摘要:如果 有异常,请使用 return 返回 异常,否则程序会被终止 也可用 下面的方法,将异常包装起来 func ProtectFunc(entry func()) { defer func() { //必须要先声明defer,否则不能捕获到panic异常 fmt.Println("发生异常。") e 阅读全文

posted @ 2020-07-15 18:39 正义的伙伴! 阅读(285) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
//增加一段JS脚本,为目录生成使用
点击右上角即可分享
微信分享提示