toorop / whois-parser-go

Go module for whois info parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

whois-parser.go

whois-parser-go is a simple Go module for whois info parser.

Build Status

Overview

It will parser the provided whois information and reutrn a readable data in struct.

Work for most domain extensions and most of the time.

Installation

go get github.com/likexian/whois-parser-go

Importing

import (
    "github.com/likexian/whois-parser-go"
)

Documentation

func Parser(whois string) (whois_info WhoisInfo, err error)

Example

result, err := whois_parser.Parser(whois_raw)
if err != nil {
    // Print the domain status
    fmt.Println(result.Registrar.DomainStatus)

    // Print the domain created date
    fmt.Println(result.Registrar.CreatedDate)

    // Print the domain expiration date
    fmt.Println(result.Registrar.ExpirationDate)

    // Print the registrant name
    fmt.Println(result.Registrant.Name)

    // Print the registrant email address
    fmt.Println(result.Registrant.Email)
}

LICENSE

Copyright 2014, Kexian Li

Apache License, Version 2.0

Whois info query in Go

Please refer to whois-go

About

About

Go module for whois info parser

License:Other


Languages

Language:Go 76.3%Language:C++ 19.3%Language:Ruby 4.4%