This repository has been archived by the owner on Apr 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ungx-ed commit d9f2bafa45693db2388544097089b3c7a5182110
- Loading branch information
Showing
27 changed files
with
143 additions
and
1,769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
os: | ||
- linux | ||
|
||
language: go | ||
|
||
go: | ||
- 1.12.x | ||
|
||
env: | ||
GO111MODULE=on | ||
|
||
cache: | ||
directories: | ||
- $GOPATH/pkg/mod | ||
- /home/travis/.cache/go-build | ||
|
||
notifications: | ||
email: false |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# go-is-domain | ||
|
||
This package is dedicated to [@whyrusleeping](https://github.com/whyrusleeping). | ||
|
||
Docs: https://godoc.org/github.com/jbenet/go-is-domain | ||
|
||
|
||
Check whether something is a domain. | ||
|
||
|
||
```Go | ||
|
||
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](https://data.iana.org/TLD/tlds-alpha-by-domain.txt). | ||
|
||
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ | |
"language": "go", | ||
"license": "MIT", | ||
"name": "go-is-domain", | ||
"version": "1.0.1" | ||
"version": "1.0.2" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,3 @@ done >> $out | |
echo '}' >> $out | ||
|
||
gofmt -w $out | ||
|
||
|
File renamed without changes.
Oops, something went wrong.