bettercap/vendor/github.com/jpillora/go-tld/example/main.go
2018-03-23 15:25:11 +01:00

14 lines
259 B
Go

package main
import (
"fmt"
"github.com/jpillora/go-tld"
)
func main() {
u, _ := tld.Parse("http://a.very.complex-domain.co.uk:8080/foo/bar")
fmt.Printf("%s\n = [ %s ] [ %s ] [ %s ] [ %s ] [ %s ]",
u, u.Subdomain, u.Domain, u.TLD, u.Port, u.Path)
}