---
title: "Discussion on \"Go Cheatsheet - url parse / encode\" | Hashnode"
description: "Discussion on \"Go Cheatsheet - url parse / encode\". URL\nURL Parse\nimport (\n    \"fmt\"\n    \"net/url\"\n)\n\nfunc main() {\n    loc := \"https://youdomain.com:8080/path?kw=search&lang=en\"\n    parsed, _ := url.Parse(loc)\n    serialized, _ := json.MarshalIndent(parsed, \"\", \"  \")\n    fmt.Println(string(serialized..."
url: "https://hashnode.com/posts/go-cheatsheet-url-parse-encode/6080e09cc99e200d08f83bff"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go Cheatsheet - url parse / encode](https://hn.0xbf.me/go-cheatsheet-url-parse-encode?utm_source=hashnode&utm_medium=feed)

URL URL Parse import ( "fmt" "net/url" ) func main() { loc := "https://youdomain.com:8080/path?kw=search&lang=en" parsed, \_ := url.Parse(loc) serialized, \_ := json.MarshalIndent(parsed, "", " ") fmt.Println(string(serialized...

Apr 22, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
