A tool to parse URL written in Go
$ gurl --help
Usage:
gurl [OPTIONS] input
Application Options:
-f, --format= format output with text/template syntax
-n, --no-newline do not print new line symbol'
Help Options:
-h, --help Show this help message
$ gurl --format "{{(index .Query.scopes 0)}}" "/test?scopes=a%20b"
a b
$ gurl --format "{{.Scheme}}://{{.Host}}{{.Path}}" "https://example.com/test?scopes=a%20b"
https://example.com/test
Can be also used in conjunction with xargs
.