From 08e78652e5261d8473605eb189718de5933d1db1 Mon Sep 17 00:00:00 2001 From: Kohei Okazaki Date: Sun, 24 Mar 2024 11:25:43 +0900 Subject: [PATCH 1/2] fix fmt ci --- .github/workflows/test.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b3556ea..34c6172 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,7 +25,10 @@ jobs: run: make - name: Fmt - run: make fmt + run: | + if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then + exit 1 + fi - name: Test run: make test From 05cda466ff17aa4952ae63d347c075fc0fecccf3 Mon Sep 17 00:00:00 2001 From: Kohei Okazaki Date: Sun, 24 Mar 2024 11:40:46 +0900 Subject: [PATCH 2/2] fix fmt --- main_test.go | 4 ++-- record.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main_test.go b/main_test.go index f22b4c1..be2b009 100644 --- a/main_test.go +++ b/main_test.go @@ -129,8 +129,8 @@ func TestResponsePacket(t *testing.T) { expectedDnsRecords: []DnsRecord{ { domain: "www.yahoo.com", - host: "me-ycpi-cf-www.g06.yahoodns.net", - ttl: 60, + host: "me-ycpi-cf-www.g06.yahoodns.net", + ttl: 60, }, { domain: "me-ycpi-cf-www.g06.yahoodns.net", diff --git a/record.go b/record.go index ddb83f7..5736207 100644 --- a/record.go +++ b/record.go @@ -8,7 +8,7 @@ type DnsRecord struct { domain string ttl uint32 addr string - host string + host string } // NewDnsRecord creates a new DnsRecord