会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
zipon
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
···
35
下一页
2020年10月28日
go-chart go后端生成图表base64
摘要: const imgStrPrefix = "data:image/png;base64," func imgToStr(imgContent bytes.Buffer) string { return imgStrPrefix + base64.StdEncoding.EncodeToString(
阅读全文
posted @ 2020-10-28 15:53 zipon
阅读(361)
评论(0)
推荐(0)
2020年10月26日
golang OOM分析
摘要: curl localhost:8888/debug/pprof/heap >heap.base sleep 60s curl localhost:8888/debug/pprof/heap >heap.current go tool pprof -http localhost:8889 -base
阅读全文
posted @ 2020-10-26 16:14 zipon
阅读(2946)
评论(0)
推荐(0)
2020年10月20日
Golang xorm time自定义解析
摘要: type JsonTime time.Time func (j JsonTime) MarshalJSON() ([]byte, error) { //时间为空默认格式 if time.Time(j).IsZero() { return []byte(`""`), nil } return []by
阅读全文
posted @ 2020-10-20 10:54 zipon
阅读(578)
评论(0)
推荐(0)
2020年10月13日
性能指标命令集合
该文被密码保护。
阅读全文
posted @ 2020-10-13 09:59 zipon
阅读(2)
评论(0)
推荐(0)
2020年9月15日
golang 中文英文混合按字节截取
摘要: func show_strlen(s string) int { sl := 0 rs := []rune(s) for _, r := range rs { rint := int(r) if rint < 128 { sl++ } else { sl += 2 } } return sl } #
阅读全文
posted @ 2020-09-15 19:06 zipon
阅读(340)
评论(0)
推荐(0)
2020年8月11日
pip更换国内源
摘要: pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 2.修改配置文件~/.pip/pip.conf 3.pip install locustio -i https://pypi.tuna.tsinghua.
阅读全文
posted @ 2020-08-11 16:34 zipon
阅读(595)
评论(0)
推荐(0)
2020年8月6日
mongodb 4.X 创建用户以及授权
摘要: 【转】https://www.cnblogs.com/swordfall/p/10841418.html 本文是基于windows 下 MongoDB 4.0编写,据了解MongoDB在3.0以后的版本中权限设置有变化。 1. 创建超级用户 安装完之后,打开命令行,进入mongodb安装目录,在bi
阅读全文
posted @ 2020-08-06 15:46 zipon
阅读(2336)
评论(0)
推荐(0)
2020年7月27日
文件上传之后,MD5不一致,大小一致
摘要: 大概率跨系统导致的问题。是因为windows和linux默认编码不一致,当出现中文时,又没声明编码格式,会出现这种情况。 解决方案: 例如python # -*- coding: utf-8 -*-
阅读全文
posted @ 2020-07-27 18:07 zipon
阅读(2732)
评论(0)
推荐(0)
2020年7月23日
golang macaron各种形式入参封装
摘要: func HandleResp (ctx *gin.Context, apiInfo models.ApiInfo) error{ var buf bytes.Buffer reqbody,err := ioutil.ReadAll(ctx.Request.Body) //fmt.Println("
阅读全文
posted @ 2020-07-23 15:57 zipon
阅读(605)
评论(0)
推荐(0)
2020年7月17日
golang module goland 配置代理
摘要: 或者阿里云镜像代理 export GOPROXY=https://mirrors.aliyun.com/goproxy/
阅读全文
posted @ 2020-07-17 11:30 zipon
阅读(2742)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
35
下一页
公告