Skip to content

Command line application to format data containing parentheses

License

Notifications You must be signed in to change notification settings

lusingander/geezer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geezer

Command line application to format data containing parentheses

Installation

$ go install github.com/lusingander/geezer@latest

(require Go 1.19+)

Usage

$ echo "Foo(bar=Bar(baz={n=1,m=2},qux=Qux(name=qqq,value=[1,2,3])))" | geezer
Foo(
  bar = Bar(
    baz = {
      n = 1,
      m = 2
    },
    qux = Qux(
      name = qqq,
      value = [
        1,
        2,
        3
      ]
    )
  )
)

Options

  -n int
        indent width (default 2)
  -s string
        characters with spaces before and after (default "=")

For exapmle:

$ echo "foo:{bar:{n:1,m:2}}" | go run main.go -n 1 -s ":" 
foo : {
 bar : {
  n : 1,
  m : 2
 }
}

License

MIT

About

Command line application to format data containing parentheses

Topics

Resources

License

Stars

Watchers

Forks

Languages