https://github.com/jiyamathias/tld
golang TLD library
https://github.com/jiyamathias/tld
golang tld
Last synced: 5 months ago
JSON representation
golang TLD library
- Host: GitHub
- URL: https://github.com/jiyamathias/tld
- Owner: jiyamathias
- License: mit
- Created: 2022-11-19T21:36:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-03T10:18:02.000Z (about 3 years ago)
- Last Synced: 2026-01-14T16:08:50.487Z (5 months ago)
- Topics: golang, tld
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Domain
### You can use the tld package to get the list of all **TLDs**
# Installation
1. You can use the below Go command to install the domain package
```sh
$ go get -u github.com/iqquee/tld
```
2. Import it in your code:
```sh
import "github.com/iqquee/tld"
```
# Quick start
```sh
# assume the following codes in example.go file
$ touch example.go
# open the just created example.go file in the text editor of your choice
```
# Tlds List
To get the list of all TLDs
```go
package main
import (
"fmt"
"github.com/iqquee/tld"
)
func main() {
for _, v := range tld.Tlds {
for _, tlds := range v.Tld {
fmt.Printf("This is the tld response: %v\n", tlds.Tld)
}
}
}
```