Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 566 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 566 Bytes

gurl

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

Usage examples

$ 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.