Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.4

- 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 ./...
3 changes: 2 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ notarize:
key: "{{.Env.MACOS_NOTARY_KEY}}"

archives:
- format: zip
- formats:
- zip

changelog:
disable: false
Expand Down
10 changes: 5 additions & 5 deletions internal/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions internal/domain/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down
Loading