gotld

package module
v0.0.0-...-39287e3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2017 License: BSD-2-Clause Imports: 2 Imported by: 2

README

gotld

Get domain's tld by go

Install gotld

go get github.com/forease/gotld

Import gotld

import "github.com/forease/gotld"

Use gotld

For example.

tld, domain, err := gotld.GetTld( *url )
if err != nil {
    fmt.Println( err )
    return
}
fmt.Printf( "TLD: %s, Domain: %s\n", tld.Tld, domain )

About

北京实易时代科技有限公司
Beijing ForEase Times Technology Co., Ltd.
http://www.forease.net

Contact me

Jonsen Yang
im16hot#gmail.com (replace # with @)

Documentation

Overview

create time: 2017-10-21 21:13:03

*

*
*

Index

Constants

View Source
const (
	GOTLD_VERSION = "gotld V1.2"
)

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

Types

type TldItem

type TldItem struct {
	Id                     int32
	Country, Tld, Category string
	Lables                 int
}

tld item

func GetTld

func GetTld(url string) (tld TldItem, domain string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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