2 İşlemeler 791558543c ... bbfc0ec172

Yazar SHA1 Mesaj Tarih
  Miek Gieben bbfc0ec172 Merge pull request #10 from clebertsuconic/new-readme 5 yıl önce
  Miek Gieben 791558543c Merge pull request #10 from clebertsuconic/new-readme 5 yıl önce
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      example.go

+ 3 - 0
example.go

@@ -12,6 +12,7 @@ import (
 	"github.com/coredns/coredns/plugin"
 	"github.com/coredns/coredns/plugin/metrics"
 	clog "github.com/coredns/coredns/plugin/pkg/log"
+	"github.com/coredns/coredns/request"
 
 	"github.com/miekg/dns"
 )
@@ -34,6 +35,8 @@ func (e Example) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
 	// answer comes back, it will print "example".
 
 	// Debug log that we've have seen the query. This will only be shown when the debug plugin is loaded.
+	state := request.Request{W: w, Req: r}
+	fmt.Fprintln(out, state.QName())
 	log.Debug("Received response")
 
 	// Wrap.