Skip to content

Utility libraries for YAML in Go. Initial functionality is to get line and column numbers for JSON pointers, as used in OpenAPI Spec.

License

Notifications You must be signed in to change notification settings

grokify/yamlutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAML Utility for Go

Used By Build Status Go Report Card Docs License

Overview

The yamlutil package provides a collection of Go utilities for YAML.

  1. 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.
  2. A secondary feature is the ReadFileAsJson() function which will read a YAML file and convert it to JSON using github.com/ghodss/yaml.

Installation

$ go get github.com/grokify/yamlutil

Contributing

Features, Issues, and Pull Requests are always welcome.

To contribute:

  1. Fork it ( http://github.com/grokify/yamlutil/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please report issues and feature requests on Github.

About

Utility libraries for YAML in Go. Initial functionality is to get line and column numbers for JSON pointers, as used in OpenAPI Spec.

Resources

License

Stars

Watchers

Forks

Languages