Package iptoasn
uses Team Cymru's IP to ASN mapping service for querying BGP origin information about a given IP address. It supports both IPv4 and IPv6 (of course, this isn't 1982).
This uses the DNS interface to the IP to ASN service rather than the WHOIS interface.
ip, err := iptoasn.LookupIP("2001:db8::1")
as, err := iptoasn.LookupASN("as20712")
A whoisip
command is provided as a simple tool for performing IP or AS lookups using the library.
MIT