Commit 45fec1d2 authored by Nigel Tao's avatar Nigel Tao

publicsuffix: add comments on the icann return value

Change-Id: I51d236b07f187a6cbf4f6b8167f445e3280bbdf6
Reviewed-on: https://go-review.googlesource.com/c/155199Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
parent e147a913
...@@ -72,12 +72,15 @@ func (list) String() string { ...@@ -72,12 +72,15 @@ func (list) String() string {
// publicsuffix.org database compiled into the library. // publicsuffix.org database compiled into the library.
// //
// icann is whether the public suffix is managed by the Internet Corporation // icann is whether the public suffix is managed by the Internet Corporation
// for Assigned Names and Numbers. If not, the public suffix is privately // for Assigned Names and Numbers. If not, the public suffix is either a
// managed. For example, foo.org and foo.co.uk are ICANN domains, // privately managed domain (and in practice, not a top level domain) or an
// foo.dyndns.org and foo.blogspot.co.uk are private domains. // unmanaged top level domain (and not explicitly mentioned in the
// publicsuffix.org list). For example, "foo.org" and "foo.co.uk" are ICANN
// domains, "foo.dyndns.org" and "foo.blogspot.co.uk" are private domains and
// "cromulent" is an unmanaged top level domain.
// //
// Use cases for distinguishing ICANN domains like foo.com from private // Use cases for distinguishing ICANN domains like "foo.com" from private
// domains like foo.appspot.com can be found at // domains like "foo.appspot.com" can be found at
// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases // https://wiki.mozilla.org/Public_Suffix_List/Use_Cases
func PublicSuffix(domain string) (publicSuffix string, icann bool) { func PublicSuffix(domain string) (publicSuffix string, icann bool) {
lo, hi := uint32(0), uint32(numTLD) lo, hi := uint32(0), uint32(numTLD)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment