From c8a588fabb58695d8c98dc893fb5ce565291dc4d Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 3 Sep 2012 13:16:16 +0200 Subject: [PATCH] Add authors bind stuff --- TODO.markdown | 1 - example_test.go | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/TODO.markdown b/TODO.markdown index f4d29b09..41ece80b 100644 --- a/TODO.markdown +++ b/TODO.markdown @@ -4,7 +4,6 @@ * put axfr in q * make example from chaos - ## Nice to have * Speed, we can always go faster. A simple reflect server now hits 35/45K qps diff --git a/example_test.go b/example_test.go index 507fff67..a1a2e9c4 100644 --- a/example_test.go +++ b/example_test.go @@ -51,3 +51,17 @@ func ExampleToDs(zone string) { } } } + +// Show how to setup the authors for 'authors.bind. CH TXT' or 'authors.server. CH TXT' +// queries. +func ExampleAuthors() { + // ... server setup is out of scope ... + HandleFunc("authors.bind.", HandleAuthors) + HandleFunc("authors.server.", HandleAuthors) + + // To extend the authors list, just append to dns.Authors (a []string) + Authors = append(Authors, "G. I. Joe") + + // Or + Authors = []string{"Just Me"} +}