yamlspew

command module
v0.0.0-...-308cfbb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

README

yamlspew

Simple program to parse YAML with Golang and output the parsed tree with 'spew':[https://godoc.org/github.com/davecgh/go-spew/spew], a deep pretty printer for Go data structures.

yamlspew reads from standard input and outputs every document as 'spew' rendition of the parse objects. Documents are seperated by a // comment line.

Example usage:

$ echo '{ int: 2, float: 3.4e5, bool: true, nothing: ~ , sequence: [1,2], base64: !!binary WUVT } ' | ./yamlspew
(map[interface {}]interface {}) (len=6) {
 (string) (len=8) "sequence": ([]interface {}) (len=2 cap=2) {
  (int) 1,
  (int) 2
 },
 (string) (len=6) "base64": (string) (len=3) "YES",
 (string) (len=3) "int": (int) 2,
 (string) (len=5) "float": (float64) 340000,
 (string) (len=4) "bool": (bool) true,
 (string) (len=7) "nothing": (interface {}) <nil>
}

yamlok uses the Go language YAML parser "gopkg.in/yaml.v3"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL