Run golint and go vet (#276)

Cleanup the errors and removed deadcode along the way. The leaves
some error laying around, mostly about commenting exported identifier.
We should look hard if those really are needed.
This commit is contained in:
Miek Gieben
2016-09-21 17:01:19 +01:00
committed by GitHub
parent 7b79458c8a
commit 5301c5af5f
25 changed files with 60 additions and 386 deletions

View File

@@ -2,14 +2,20 @@ package response
import "github.com/miekg/dns"
// Type is the type of the message
type Type int
const (
Success Type = iota
NameError // NXDOMAIN in header, SOA in auth.
NoData // NOERROR in header, SOA in auth.
Delegation // NOERROR in header, NS in auth, optionally fluff in additional (not checked).
OtherError // Don't cache these.
// Success indicates a positive reply
Success Type = iota
// NameError is a NXDOMAIN in header, SOA in auth.
NameError
// NoData indicated name found, but not the type: NOERROR in header, SOA in auth.
NoData
// Delegation is a msg with a pointer to another nameserver: NOERROR in header, NS in auth, optionally fluff in additional (not checked).
Delegation
// OtherError indicated any other error: don't cache these.
OtherError
)
// Classify classifies a message, it returns the Type.