go-yaml2json:将 YAML 转换为 JSON 以进行 Go

时间:2021-06-28 07:47:44
【文件属性】:
文件名称:go-yaml2json:将 YAML 转换为 JSON 以进行 Go
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-28 07:47:44
Go 将 YAML 转换为 JSON。 安装 go get -u github.com/peter-edge/go-yaml2json 进口 import ( "github.com/peter-edge/go-yaml2json" ) 灵感来自 ,一个具有相同效果的命令行工具。 import ( "encoding/json" "io/ioutil" "os" "github.com/peter-edge/go-yaml2json" ) func ReadYamlToJson(yamlFilePath string) (interface{}, error) { yamlFile, err := os.Open(yamlFilePath) if err != nil { return nil, err } defer yamlFile.Close() ya
【文件预览】:
go-yaml2json-master
----yaml2json.go(1KB)
----doc.go(712B)
----LICENSE(1KB)
----_testdata()
--------fig.yml(516B)
--------fig.json(641B)
----.readme.header(619B)
----.gitignore(266B)
----yaml2json_test.go(976B)
----Makefile(426B)
----README.md(1KB)

网友评论