Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/crhntr/yamlutil


https://github.com/crhntr/yamlutil

Last synced: about 2 months ago
JSON representation

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.