https://github.com/crhntr/yamlutil
Helpful utilities for using yaml.Node
https://github.com/crhntr/yamlutil
Last synced: about 2 months ago
JSON representation
Helpful utilities for using yaml.Node
- Host: GitHub
- URL: https://github.com/crhntr/yamlutil
- Owner: crhntr
- License: mit
- Created: 2023-03-02T23:11:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T23:34:12.000Z (9 months ago)
- Last Synced: 2025-04-22T22:51:19.307Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yamlutil [](https://pkg.go.dev/github.com/crhntr/yamlutil) [](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.