ipld-eth-server/vendor/github.com/jbenet/go-is-domain
Elizabeth Engelman 36533f7c3f Update vendor directory and make necessary code changes
Fixes for new geth version
2019-09-25 16:32:27 -05:00
..
.travis.yml Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
doc.go Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
domainre.go Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
go.mod Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
is_domain.go Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
LICENSE Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
package.json Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
README.md Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
regenerate-tlds.sh Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
tlds_custom.go Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00
tlds_iana.go Update vendor directory and make necessary code changes 2019-09-25 16:32:27 -05:00

go-is-domain

This package is dedicated to @whyrusleeping.

Docs: https://godoc.org/github.com/jbenet/go-is-domain

Check whether something is a domain.


import (
  isd "github.com/jbenet/go-is-domain"
)

isd.IsDomain("foo.com") // true
isd.IsDomain("foo.bar.com.") // true
isd.IsDomain("foo.bar.baz") // false

MIT Licensed

Updating TLDs

To update non-extended TLDs, IANA publishes, you can retrieve them from data.iana.org.

After retrieving the updated list, enter them into the file tlds-alpha-by-domain.txt. In order to update the TLDs map in tlds.go, you can run the gen.sh script which will generate the contents of a string -> bool map. After that, you'll want to replace the contents of the existing TLDs map, with the one that was generated and stored in formatted_tlds.txt