mirror of
https://github.com/miekg/dns.git
synced 2025-12-16 09:11:34 +01:00
Run gofmt -w -s (#971)
mechanical run of gofmt. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
0930b62a13
commit
087e486609
38
fuzz_test.go
38
fuzz_test.go
@ -85,23 +85,23 @@ func TestPackDataOpt(t *testing.T) {
|
|||||||
func TestCrashNSEC(t *testing.T) {
|
func TestCrashNSEC(t *testing.T) {
|
||||||
compression := make(map[string]struct{})
|
compression := make(map[string]struct{})
|
||||||
nsec := &NSEC{
|
nsec := &NSEC{
|
||||||
Hdr: RR_Header{
|
Hdr: RR_Header{
|
||||||
Name:".",
|
Name: ".",
|
||||||
Rrtype:0x2f,
|
Rrtype: 0x2f,
|
||||||
Class:0x3030,
|
Class: 0x3030,
|
||||||
Ttl:0x30303030,
|
Ttl: 0x30303030,
|
||||||
Rdlength:0xb,
|
Rdlength: 0xb,
|
||||||
},
|
},
|
||||||
NextDomain:".",
|
NextDomain: ".",
|
||||||
TypeBitMap:[]uint16{
|
TypeBitMap: []uint16{
|
||||||
0x2302, 0x2303, 0x230a, 0x230b,
|
0x2302, 0x2303, 0x230a, 0x230b,
|
||||||
0x2312, 0x2313, 0x231a, 0x231b,
|
0x2312, 0x2313, 0x231a, 0x231b,
|
||||||
0x2322, 0x2323,
|
0x2322, 0x2323,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
expectedLength := 19
|
expectedLength := 19
|
||||||
l := nsec.len(0, compression)
|
l := nsec.len(0, compression)
|
||||||
if l != expectedLength {
|
if l != expectedLength {
|
||||||
t.Fatalf("expected length of %d, got %d", expectedLength, l)
|
t.Fatalf("expected length of %d, got %d", expectedLength, l)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
msg_test.go
10
msg_test.go
@ -220,11 +220,11 @@ func TestUnpackDomainName(t *testing.T) {
|
|||||||
|
|
||||||
func TestPackDomainNameCompressionMap(t *testing.T) {
|
func TestPackDomainNameCompressionMap(t *testing.T) {
|
||||||
expected := map[string]struct{}{
|
expected := map[string]struct{}{
|
||||||
`www\.this.is.\131an.example.org.`: struct{}{},
|
`www\.this.is.\131an.example.org.`: {},
|
||||||
`is.\131an.example.org.`: struct{}{},
|
`is.\131an.example.org.`: {},
|
||||||
`\131an.example.org.`: struct{}{},
|
`\131an.example.org.`: {},
|
||||||
`example.org.`: struct{}{},
|
`example.org.`: {},
|
||||||
`org.`: struct{}{},
|
`org.`: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := make([]byte, 256)
|
msg := make([]byte, 256)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user