The yamlutil
package provides a collection of Go utilities for YAML.
- The primary feature is the
GetNodeJsonSchemaPath()
function which returns a*yaml.Node
for a pre-parsed JSON Schema pointer path. The primary use case is to get line numbers of linters using JSON Schema pointer to access a YAML file, e.g. OpenAPI specification files. - A secondary feature is the
ReadFileAsJson()
function which will read a YAML file and convert it to JSON usinggithub.com/ghodss/yaml
.
$ go get github.com/grokify/yamlutil
Features, Issues, and Pull Requests are always welcome.
To contribute:
- Fork it ( http://github.com/grokify/yamlutil/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Please report issues and feature requests on Github.