From ff362b4200a1e807fad88f4c21503d2cf3b9eb24 Mon Sep 17 00:00:00 2001 From: Ryan McKern Date: Fri, 22 Aug 2025 02:37:01 -0400 Subject: [PATCH 1/5] Update goreleaser config --- .goreleaser.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5ecad03..6ace7ce 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -40,7 +40,8 @@ notarize: key: "{{.Env.MACOS_NOTARY_KEY}}" archives: - - format: zip + - formats: + - zip changelog: disable: false From ec2ce76d10a1b9439de6c43206f4535134597cb3 Mon Sep 17 00:00:00 2001 From: Ryan McKern Date: Fri, 22 Aug 2025 02:40:49 -0400 Subject: [PATCH 2/5] Update Actions workflows --- .github/workflows/release.yaml | 4 ++-- .github/workflows/test.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e76be0e..1b8e7d5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,14 +19,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1debfd8..62d4a3b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,14 +12,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.24" - name: Run tests run: go test -v ./... From 44f8cc41bdda012f3bb692f43d46291b210efc8b Mon Sep 17 00:00:00 2001 From: Ryan McKern Date: Fri, 22 Aug 2025 02:48:21 -0400 Subject: [PATCH 3/5] Add linting step to Test workflow --- .github/workflows/test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 62d4a3b..dda5e61 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,6 +16,11 @@ jobs: with: fetch-depth: 0 + - name: golangci-lint + uses: golangci/golangci-lint-action@v8 + with: + version: v2.1 + - name: Set up Go uses: actions/setup-go@v5 with: From cf629a82cc376e2503d3f5a821f2af4e499d1e9d Mon Sep 17 00:00:00 2001 From: Ryan McKern Date: Fri, 22 Aug 2025 03:19:30 -0400 Subject: [PATCH 4/5] Address linter complaints --- internal/certificate/certificate.go | 10 +++++----- internal/domain/domain_test.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/certificate/certificate.go b/internal/certificate/certificate.go index fcaa60b..e1d1711 100644 --- a/internal/certificate/certificate.go +++ b/internal/certificate/certificate.go @@ -16,10 +16,9 @@ import ( const defaultTLSPort = "443" type Certificate struct { - addr string - name string - insecure bool - raw *x509.Certificate + addr string + name string + raw *x509.Certificate } var _ spiry.ExpiringResource = (*Certificate)(nil) @@ -113,7 +112,8 @@ func (c *Certificate) getCert() (cert *x509.Certificate, err error) { return } - defer conn.Close() + defer func() { _ = conn.Close() }() + certs := conn.ConnectionState().PeerCertificates cert = certs[0] return diff --git a/internal/domain/domain_test.go b/internal/domain/domain_test.go index d1bb631..10e060e 100644 --- a/internal/domain/domain_test.go +++ b/internal/domain/domain_test.go @@ -42,7 +42,7 @@ func handleConnection(c net.Conn) { log.Fatal(err) } - defer file.Close() + defer func() { _ = file.Close() }() scanner := bufio.NewScanner(file) for scanner.Scan() { @@ -55,7 +55,7 @@ func handleConnection(c net.Conn) { if err := scanner.Err(); err != nil { log.Fatal(err) } - c.Close() + _ = c.Close() } func startWhoisServer(l net.Listener) { @@ -70,7 +70,7 @@ func startWhoisServer(l net.Listener) { func stopWhoisServer(l net.Listener) { log.Printf("stopping fake whois server on %v\n", l.Addr().String()) - l.Close() + _ = l.Close() } func TestMain(m *testing.M) { From bcc8e177345bcd52446be00ffc8e722d8b3b142d Mon Sep 17 00:00:00 2001 From: Ryan McKern Date: Fri, 22 Aug 2025 03:22:35 -0400 Subject: [PATCH 5/5] Use newest golangci-lint --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dda5e61..0d18500 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.1 + version: v2.4 - name: Set up Go uses: actions/setup-go@v5