Run gofmt -w -s (#971)

mechanical run of gofmt.

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben 2019-05-20 07:44:53 +01:00 committed by GitHub
parent 0930b62a13
commit 087e486609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 24 deletions

View File

@ -85,23 +85,23 @@ func TestPackDataOpt(t *testing.T) {
func TestCrashNSEC(t *testing.T) {
compression := make(map[string]struct{})
nsec := &NSEC{
Hdr: RR_Header{
Name:".",
Rrtype:0x2f,
Class:0x3030,
Ttl:0x30303030,
Rdlength:0xb,
},
NextDomain:".",
TypeBitMap:[]uint16{
0x2302, 0x2303, 0x230a, 0x230b,
0x2312, 0x2313, 0x231a, 0x231b,
0x2322, 0x2323,
},
}
expectedLength := 19
l := nsec.len(0, compression)
if l != expectedLength {
t.Fatalf("expected length of %d, got %d", expectedLength, l)
}
Hdr: RR_Header{
Name: ".",
Rrtype: 0x2f,
Class: 0x3030,
Ttl: 0x30303030,
Rdlength: 0xb,
},
NextDomain: ".",
TypeBitMap: []uint16{
0x2302, 0x2303, 0x230a, 0x230b,
0x2312, 0x2313, 0x231a, 0x231b,
0x2322, 0x2323,
},
}
expectedLength := 19
l := nsec.len(0, compression)
if l != expectedLength {
t.Fatalf("expected length of %d, got %d", expectedLength, l)
}
}

View File

@ -220,11 +220,11 @@ func TestUnpackDomainName(t *testing.T) {
func TestPackDomainNameCompressionMap(t *testing.T) {
expected := map[string]struct{}{
`www\.this.is.\131an.example.org.`: struct{}{},
`is.\131an.example.org.`: struct{}{},
`\131an.example.org.`: struct{}{},
`example.org.`: struct{}{},
`org.`: struct{}{},
`www\.this.is.\131an.example.org.`: {},
`is.\131an.example.org.`: {},
`\131an.example.org.`: {},
`example.org.`: {},
`org.`: {},
}
msg := make([]byte, 256)