Login
From:
gosamples.dev
(Uncensored)
subscribe
Get a hostname (domain) from a URL in Go (Golang)
https://gosamples.dev/get-hostname-domain/
links
backlinks
Roast topics
Find topics
Find it!
To get a hostname or domain from a URL in Go, read the url string with the url.Parse() function, and then use the url.Hostname() method to get the host