domain

package module
v0.0.0-...-2ebadef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

README

domain

domain parser

Usage

u, _ := domain.Parse("http://foo.bar.imroc.com.cn:8080/hello?q=arg")
println(u.Subdomain)    // foo.bar
println(u.Domain)       // imroc
println(u.PublicSuffix) // com.cn

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	Subdomain    string
	Domain       string
	PublicSuffix string
}

func Parse

func Parse(uri string) (url *URL, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL