From 087e486609acc631d6e80212ca8059fdd43300d0 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 20 May 2019 07:44:53 +0100 Subject: [PATCH] Run gofmt -w -s (#971) mechanical run of gofmt. Signed-off-by: Miek Gieben --- fuzz_test.go | 38 +++++++++++++++++++------------------- msg_test.go | 10 +++++----- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/fuzz_test.go b/fuzz_test.go index 2579efb7..7f632302 100644 --- a/fuzz_test.go +++ b/fuzz_test.go @@ -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) + } } diff --git a/msg_test.go b/msg_test.go index 55cc87a1..389427de 100644 --- a/msg_test.go +++ b/msg_test.go @@ -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)