Skip to content

dmitryrpm/whois-parser-go

 
 

Repository files navigation

whois-parser.go

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

Build Status

Overview

It will parse the provided whois information and return a readable data struct.

Works for most domain extensions most of the time.

Installation

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

Importing

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

Documentation

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

Example

result, err := whois_parser.Parse(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)
}

Whois info query in Go

Please refer to whois-go

LICENSE

Copyright 2014-2018, Li Kexian

Apache License, Version 2.0

DONATE

About

About

Go module for whois info parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%