Skip to content

Instantly share code, notes, and snippets.

@jgrahamc
jgrahamc / loc_parser.go
Created March 27, 2014 13:43
DNS LOC textual record parser
// loc_parser: functions to parse the textual part of a LOC record
// stored in our DNS. The key function here is parseLOCString which
// should be passed a dns.LOC and a string containing the latitude,
// longitude etc.
//
// This is an implementation of RFC 1876. Read it for background as
// the format in a dns.LOC is slightly unusual.
//
// Copyright (c) 2014 CloudFlare, Inc.