mwarkentin / yuri

CLI tool to parse URIs into their components
MIT License
4 stars 3 forks source link

Fix #2: Add hostname and port to output #27

Closed mwarkentin closed 7 years ago

mwarkentin commented 7 years ago

Backports the code from Go 1.8: https://github.com/golang/go/commit/1ff19201fd898c3e1a0ed5d3458c81c1f062570b

Example:

{
  "fragment": "FRAG",
  "host": "stage.example.com:443",
  "hostname": "stage.example.com",
  "port": "443",
  "opaque": "",
  "password": "password",
  "path": "/path+to+foo",
  "rawpath": "/path+to+foo",
  "rawquery": "query1=1&query2=2",
  "scheme": "https",
  "username": "username"
}