Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crhntr/yamlutil
https://github.com/crhntr/yamlutil
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/crhntr/yamlutil
- Owner: crhntr
- License: mit
- Created: 2023-03-02T23:11:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-10T07:44:04.000Z (10 months ago)
- Last Synced: 2024-03-10T08:41:37.170Z (10 months ago)
- Language: Go
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yamlutil [![Go Reference](https://pkg.go.dev/badge/github.com/crhntr/yamlutil.svg)](https://pkg.go.dev/github.com/crhntr/yamlutil) [![Go](https://github.com/crhntr/yamlutil/actions/workflows/go.yml/badge.svg)](https://github.com/crhntr/yamlutil/actions/workflows/go.yml)
This repository has utilities for working with the Node type in [YAML V3](https://pkg.go.dev/gopkg.in/yaml.v3).
## The yamlconv package
- It has a function to convert a `*yaml.Node` to JSON.
- It also contains a function to convert a `*yaml.Node` with `yaml.Kind` `yaml.DocumentNode` or `yaml.MappingNode` to a Go map.## The yamlnode package
Contains a Walk function to traverse a YAML document.
It also contains, a method to lookup the value given a (string) key in a `yaml.DocumentNode` or `yaml.MappingNode`.You may want to use [yqlib](https://pkg.go.dev/github.com/mikefarah/yq/[email protected]/pkg/yqlib) instead.