摘要: 1、GoLevelDB https://github.com/syndtr/goleveldb 功能较少,只有Get,Put,Delete,Interator几个功能 使用示例: iter := db.NewIterator(nil, nil) for iter.Next() { key := it 阅读全文
posted @ 2021-09-05 21:31 zhaogaojian 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Ubunut20.04环境 默认go marshal,Unmarshal效率较低,可以使用EasyJson 1、命令行直接输入easyjson会提示apt安装,然后安装 2、创建一个go文件,结构体上标注 //easyjson //easyjson:json type School struct { 阅读全文
posted @ 2021-09-05 21:28 zhaogaojian 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 1、以测试marshal和for循环为例 2、新建一个文件夹,添加代码 package main_test import ( "encoding/json" "fmt" "testing" ) type A struct { ContentA string `json:"content_a"` Co 阅读全文
posted @ 2021-09-05 13:41 zhaogaojian 阅读(121) 评论(0) 推荐(0) 编辑