Command line application to format data containing parentheses
$ go install github.com/lusingander/geezer@latest
(require Go 1.19+)
$ 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
]
)
)
)
-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
}
}
MIT