convertMan

command module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

README

convertMan CI Release GitHub Releases

convertMan is a tool help you convert between yaml/xml/json/tomlindependently.

⚙ Installation

CGO_ENABLED=0 \
GOBIN=/usr/bin \
go get -u -v github.com/aiziyuer/convertMan

⚡ Quickstart

# default output format is json
➜  convertMan <<EOF
teenagers:
  - body
  - girl
EOF
{"teenagers":["body","girl"]}

# options output format: yaml,json,toml,ini,xml
➜  convertMan -o toml <<EOF
teenagers:
  - body
  - girl
EOF
teenagers = ["body", "girl"]

➜  convertMan -h
Usage:
  convertMan [input file] [flags]

Flags:
      --config string    location of config files like $CONVERT_MAN_CONFIG  (default "/root/.convertMan")
  -h, --help             help for convertMan
  -i, --input string     input format: auto(default for file), yaml, json, ini, xml, toml (default "yaml")
  -o, --output string    output format: yaml, json, ini, xml, toml (default "json")
  -v, --verbose string   Log level (trace, debug, info, warn, error, fatal, panic)  (default "warning")

🤖 More

combine multiple yaml config with default.

➜  ~ cat<<EOF>default.yaml
data:
  a: 1
  b: 2
  c: 3
EOF

➜  ~ cat<<EOF>new.yaml
data:
  a: 22222
EOF

➜  ~ convertMan default.yaml new.yaml
data:
    a: 22222
    b: 2
    c: 3

🎯 Features

⭐ FAQ

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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