publicsuffix

package
v0.0.0-...-8ea73da Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2016 License: BSD-3-Clause, MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package publicsuffix provides a public suffix list based on data from http://publicsuffix.org/. A public suffix is one under which Internet users can directly register names.

Index

Constants

This section is empty.

Variables

List implements the cookiejar.PublicSuffixList interface by calling the PublicSuffix function.

Functions

func EffectiveTLDPlusOne

func EffectiveTLDPlusOne(domain string) (string, error)

EffectiveTLDPlusOne returns the effective top level domain plus one more label. For example, the eTLD+1 for "foo.bar.golang.org" is "golang.org".

func ICANNTLD

func ICANNTLD(domain string) (string, error)

ICANNTLD returns the public suffix of the domain using only the ICANN section of the library's compiled-in database. If the domain does not end in an ICANN-managed domain, ICANNTLD returns an error.

func PublicSuffix

func PublicSuffix(domain string) (publicSuffix string, icann bool)

PublicSuffix returns the public suffix of the domain using a copy of the publicsuffix.org database compiled into the library.

icann is whether the public suffix is managed by the Internet Corporation for Assigned Names and Numbers. If not, the public suffix is privately managed. For example, foo.org and foo.co.uk are ICANN domains, foo.dyndns.org and foo.blogspot.co.uk are private domains.

Use cases for distinguishing ICANN domains like foo.com from private domains like foo.appspot.com can be found at https://wiki.mozilla.org/Public_Suffix_List/Use_Cases

Types

This section is empty.

Jump to

Keyboard shortcuts

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