From ac51a3e97d83e27090dfe12c2fef781fdab76515 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 3 Sep 2012 13:01:39 +0200 Subject: [PATCH] add authors.bind and friends. --- server.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/server.go b/server.go index 4e58c29e..9c62b44d 100644 --- a/server.go +++ b/server.go @@ -70,6 +70,9 @@ func NewServeMux() *ServeMux { return &ServeMux{m: radix.New()} } // DefaultServeMux is the default ServeMux used by Serve. var DefaultServeMux = NewServeMux() +// Authors is a list of authors that helped create or make Go DNS better. +var Authors = []string{ "Miek Gieben", "Ask Bjorn Hansen", "Dave Cheney", "Dusty Wilson", "Peter van Dijk"} + // The HandlerFunc type is an adapter to allow the use of // ordinary functions as DNS handlers. If f is a function // with the appropriate signature, HandlerFunc(f) is a @@ -109,17 +112,10 @@ func HandleAuthors(w ResponseWriter, r *Msg) { // primary author m := new(Msg) m.SetReply(r) - for _, author := range []string{"Miek Gieben"} { + for _, author := range Authors { h := RR_Header{r.Question[0].Name, TypeTXT, ClassCHAOS, 0, 0} m.Answer = append(m.Answer, &RR_TXT{h, []string{author}}) } - // from git: - // git log |grep '^Author' | sort -u | sed 's/^Author: //' | sed 's/<.*>//' - // But only if I have a firstname and lastname - for _, author := range []string{"Ask Bjorn Hansen", "Dave Cheney", "Dusty Wilson", "Peter van Dijk"} { - h := RR_Header{r.Question[0].Name, TypeTXT, ClassCHAOS, 0, 0} - m.Extra = append(m.Extra, &RR_TXT{h, []string{author}}) - } w.Write(m) }