getcds:go etcd schema,将etcd directory unmarshal为struct

时间:2021-05-19 07:46:35
【文件属性】:
文件名称:getcds:go etcd schema,将etcd directory unmarshal为struct
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-19 07:46:35
Go getcds getcds 是一个把etcd中的directory直接映射到struct的工具 getcds 的限制 1、getcds 只实现了 unmarshal,未实现marshal(struct->etcd directory) 2、struct中只允许使用int、int64、string、struct 如何使用 getcds 安装getcds go get github.com/coreos/go-etcd/etcd go get github.com/jinuljt/getcds 使用getcds // 定义struct var S struct { I32 int `etcd:"i32"` I64 int `etcd:"i64"` Str string `etcd:"str"` S struct { I32 int `etcd:"i32"` I
【文件预览】:
getcds-master
----etcd_test.go(1KB)
----LICENSE(1KB)
----README.md(810B)
----etcd.go(2KB)

网友评论