Some linter fixes from Go report card. (#601)
Implement small linter fixes.
This commit is contained in:
parent
862c2faf96
commit
e508eecd67
4
edns.go
4
edns.go
|
@ -420,6 +420,7 @@ func (e *EDNS0_LLQ) String() string {
|
|||
return s
|
||||
}
|
||||
|
||||
// EDNS0_DUA implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975.
|
||||
type EDNS0_DAU struct {
|
||||
Code uint16 // Always EDNS0DAU
|
||||
AlgCode []uint8
|
||||
|
@ -442,6 +443,7 @@ func (e *EDNS0_DAU) String() string {
|
|||
return s
|
||||
}
|
||||
|
||||
// EDNS0_DHU implements the EDNS0 "DS Hash Understood" option. See RFC 6975.
|
||||
type EDNS0_DHU struct {
|
||||
Code uint16 // Always EDNS0DHU
|
||||
AlgCode []uint8
|
||||
|
@ -464,6 +466,7 @@ func (e *EDNS0_DHU) String() string {
|
|||
return s
|
||||
}
|
||||
|
||||
// EDNS0_N3U implements the EDNS0 "NSEC3 Hash Understood" option. See RFC 6975.
|
||||
type EDNS0_N3U struct {
|
||||
Code uint16 // Always EDNS0N3U
|
||||
AlgCode []uint8
|
||||
|
@ -487,6 +490,7 @@ func (e *EDNS0_N3U) String() string {
|
|||
return s
|
||||
}
|
||||
|
||||
// EDNS0_EXPIRE implementes the EDNS0 option as described in RFC 7314.
|
||||
type EDNS0_EXPIRE struct {
|
||||
Code uint16 // Always EDNS0EXPIRE
|
||||
Expire uint32
|
||||
|
|
|
@ -3,7 +3,7 @@ package dns
|
|||
// Dedup removes identical RRs from rrs. It preserves the original ordering.
|
||||
// The lowest TTL of any duplicates is used in the remaining one. Dedup modifies
|
||||
// rrs.
|
||||
// m is used to store the RRs temporay. If it is nil a new map will be allocated.
|
||||
// m is used to store the RRs temporary. If it is nil a new map will be allocated.
|
||||
func Dedup(rrs []RR, m map[string]RR) []RR {
|
||||
if m == nil {
|
||||
m = make(map[string]RR)
|
||||
|
|
|
@ -2095,7 +2095,7 @@ func setTKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
|
|||
return nil, &ParseError{f, "bad TKEY algorithm", l}, ""
|
||||
}
|
||||
rr.Algorithm = l.token
|
||||
<-c // zBlank
|
||||
<-c // zBlank
|
||||
|
||||
// Get the key length and key values
|
||||
l = <-c
|
||||
|
@ -2104,13 +2104,13 @@ func setTKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
|
|||
return nil, &ParseError{f, "bad TKEY key length", l}, ""
|
||||
}
|
||||
rr.KeySize = uint16(i)
|
||||
<-c // zBlank
|
||||
<-c // zBlank
|
||||
l = <-c
|
||||
if l.value != zString {
|
||||
return nil, &ParseError{f, "bad TKEY key", l}, ""
|
||||
}
|
||||
rr.Key = l.token
|
||||
<-c // zBlank
|
||||
<-c // zBlank
|
||||
|
||||
// Get the otherdata length and string data
|
||||
l = <-c
|
||||
|
@ -2119,7 +2119,7 @@ func setTKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
|
|||
return nil, &ParseError{f, "bad TKEY otherdata length", l}, ""
|
||||
}
|
||||
rr.OtherLen = uint16(i)
|
||||
<-c // zBlank
|
||||
<-c // zBlank
|
||||
l = <-c
|
||||
if l.value != zString {
|
||||
return nil, &ParseError{f, "bad TKEY otherday", l}, ""
|
||||
|
|
|
@ -38,9 +38,6 @@ func TestAXFR_Miek(t *testing.T) {
|
|||
t.Errorf("error %v", ex.Error)
|
||||
break
|
||||
}
|
||||
for _, rr := range ex.RR {
|
||||
// Nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,9 +86,6 @@ func TestAXFR_Miek_Tsig(t *testing.T) {
|
|||
t.Errorf("error %v", ex.Error)
|
||||
break
|
||||
}
|
||||
for _, rr := range ex.RR {
|
||||
// Nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue