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

https://github.com/yaml/go-yaml-cli


https://github.com/yaml/go-yaml-cli

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

go-yaml-cli
===========

A command line tool for the `github.com/yaml/go-yaml` library

## Description

This repo creates a command line tool called `go-yaml`.

It read YAML from stdin and outputs it in many formats, including the internal
states of `go-yaml`.

This program is extremely useful for understanding / debugging how
[go-yaml](https://github.com/yaml/go-yaml) loads YAML documents.

You might want to use its output to report bugs for behaviors of go-yaml or its
downstream consumers.

## Installation

Run:

```bash
$ make install PREFIX=
```

Where `` is the directory that contains a `bin` subdirectory where the
`go-yaml` binary will be installed: `/bin/go-yaml`.

If you have GOROOT set in your environment, you could use:

```bash
$ make install PREFIX="$GOROOT"
```

> Note: `go install github.com/yaml/go-yaml-cli@latest` doesn't work for
> this repo.

## Usage

This program reads YAML from stdin and prints output according to the options
you give it (to stdout).

Example commands:

```
$ go-yaml --help

$