Skip to content

Commit 2c8ebc9

Browse files
authored
Merge pull request #39 from grishy/sg-update-2025-01
Update dependencies and configurations, remove devcontainer
2 parents 252edde + a73c77d commit 2c8ebc9

8 files changed

Lines changed: 54 additions & 83 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/commit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ jobs:
1616
test:
1717
runs-on: ubuntu-24.04
1818
steps:
19-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
2020
- uses: actions/setup-go@v6
2121
with:
22-
go-version: "1.25.2"
22+
go-version: "1.25.6"
2323

2424
- run: go mod verify
2525

2626
- run: go test -v ./...
2727

28-
- uses: golangci/golangci-lint-action@v8
28+
- uses: golangci/golangci-lint-action@v9
2929
with:
30-
version: v2.5.0
30+
version: v2.8.0
3131

3232
build:
3333
runs-on: ubuntu-24.04
3434
steps:
35-
- uses: actions/checkout@v5
35+
- uses: actions/checkout@v6
3636
- uses: actions/setup-go@v6
3737
with:
38-
go-version: "1.25.2"
38+
go-version: "1.25.6"
3939

4040
- name: Set up QEMU for cross-compilation of Docker images
4141
uses: docker/setup-qemu-action@v3

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
release:
1414
runs-on: ubuntu-24.04
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
with:
1818
fetch-depth: 0
1919

2020
- uses: actions/setup-go@v6
2121
with:
22-
go-version: "1.25.2"
22+
go-version: "1.25.6"
2323

2424
- name: Set up QEMU for cross-compilation of Docker images
2525
uses: docker/setup-qemu-action@v3

.golangci.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
2-
# Copyright (c) 2021-2025 Marat Reymers
2+
# Copyright (c) 2021-2026 Marat Reymers
33

4-
## Golden config for golangci-lint v2.5.0
4+
## Golden config for golangci-lint v2.8.0
55
#
66
# This is the best config for golangci-lint based on my experience and opinion.
77
# It is very strict, but not extremely strict.
88
# Feel free to adapt it to suit your needs.
9-
# If this config helps you, please consider keeping a link to this file (see the next comment).
9+
# If this config helps you, please consider keeping a link to this repo (see the next comment).
1010

11-
# Based on https://gist.github.com/maratori/47a4d00457a92aa426dbd48a18776322
11+
# Based on https://github.com/maratori/golangci-lint-config
1212

1313
version: "2"
1414

@@ -27,7 +27,6 @@ formatters:
2727
## you may want to enable
2828
#- gci # checks if code and import statements are formatted, with additional rules
2929
#- gofmt # checks if the code is formatted according to 'gofmt' command
30-
#- gofumpt # enforces a stricter format than 'gofmt', while being backwards compatible
3130
#- swaggo # formats swaggo comments
3231

3332
# All settings can be found here https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml
@@ -88,6 +87,7 @@ linters:
8887
- makezero # finds slice declarations with non-zero initial length
8988
- mirror # reports wrong mirror patterns of bytes/strings usage
9089
# - mnd # detects magic numbers
90+
- modernize # suggests simplifications to Go code, using modern language and library features
9191
- musttag # enforces field tags in (un)marshaled structs
9292
- nakedret # finds naked returns in functions greater than a specified function length
9393
- nestif # reports deeply nested if statements
@@ -321,6 +321,9 @@ linters:
321321
# Assert no unused link in godocs.
322322
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#no-unused-link
323323
- no-unused-link
324+
# Require proper doc links to standard library declarations where applicable.
325+
# https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-stdlib-doclink
326+
- require-stdlib-doclink
324327

325328
govet:
326329
# Enable all analyzers.
@@ -447,18 +450,18 @@ linters:
447450
- common-false-positives
448451
# Excluding configuration per-path, per-linter, per-text and per-source.
449452
rules:
450-
# - source: "TODO"
451-
# linters: [godot]
453+
- source: 'TODO'
454+
linters: [godot]
452455
- text: "should have a package comment"
453456
linters: [revive]
454457
- text: 'exported \S+ \S+ should have comment( \(or a comment on this block\))? or be unexported'
455458
linters: [revive]
456-
# - text: 'package comment should be of the form ".+"'
457-
# source: "// ?(nolint|TODO)"
458-
# linters: [revive]
459-
# - text: 'comment on exported \S+ \S+ should be of the form ".+"'
460-
# source: "// ?(nolint|TODO)"
461-
# linters: [revive, staticcheck]
459+
- text: 'package comment should be of the form ".+"'
460+
source: '// ?(nolint|TODO)'
461+
linters: [revive]
462+
- text: 'comment on exported \S+ \S+ should be of the form ".+"'
463+
source: '// ?(nolint|TODO)'
464+
linters: [revive, staticcheck]
462465
- path: '_test\.go'
463466
linters:
464467
- bodyclose

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Need a lot of additional configuration to build multi-arch images
55

66
# STAGE 1: building the executable
7-
FROM docker.io/golang:1.25.2-alpine3.22 AS builder
7+
FROM docker.io/golang:1.25.6-alpine3.23 AS builder
88
WORKDIR /build
99

1010
ARG VERSION

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Redirect all subdomains to the machine (`*.hostname.local` → `hostname.local`)
2323
2. **Docker**:
2424

2525
```bash
26-
docker run -d --network host -v "/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket" ghcr.io/grishy/go-avahi-cname:2.3.0
26+
docker run -d --network host -v "/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket" ghcr.io/grishy/go-avahi-cname:2.4.0
2727
```
2828

2929
_Note:_ If you [encounter issues](https://github.com/grishy/go-avahi-cname/issues/28) with AppArmor, add `--security-opt apparmor=unconfined` to the Docker command or include the following in your Docker Compose file:
@@ -149,7 +149,7 @@ services:
149149
- apparmor=unconfined # required if AppArmor restricts access
150150
volumes:
151151
- "/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket"
152-
image: "ghcr.io/grishy/go-avahi-cname:2.3.0"
152+
image: "ghcr.io/grishy/go-avahi-cname:2.4.0"
153153
```
154154

155155
If AppArmor denies access, include the `security_opt` section as shown above.
@@ -160,7 +160,7 @@ Ansible task to run the container:
160160
- name: go-avahi-cname | Start container
161161
community.docker.docker_container:
162162
name: "go-avahi-cname"
163-
image: "ghcr.io/grishy/go-avahi-cname:2.3.0"
163+
image: "ghcr.io/grishy/go-avahi-cname:2.4.0"
164164
restart_policy: unless-stopped
165165
network_mode: host
166166
security_opts:
@@ -198,9 +198,9 @@ sudo busctl monitor org.freedesktop.Avahi
198198
Reminder for me, just create a tag and push it.
199199

200200
```bash
201-
# Replace 2.3.0 with the new version in project
202-
git tag -a v2.3.0 -m "Release v2.3.0"
203-
git push origin tag v2.3.0
201+
# Replace 2.4.0 with the new version in project
202+
git tag -a v2.4.0 -m "Release v2.4.0"
203+
git push origin tag v2.4.0
204204
```
205205

206206
## Source of inspiration
@@ -215,7 +215,7 @@ Generated by mix of Go Gopher and Avahi logo.
215215

216216
## License
217217

218-
© 2024 [Sergei G.](https://github.com/grishy)
218+
© 2026 [Sergei G.](https://github.com/grishy)
219219
This project is [MIT](./LICENSE) licensed.
220220

221221
<p align="center">

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
module github.com/grishy/go-avahi-cname
22

3-
go 1.25.2
3+
go 1.25.6
44

55
require (
66
github.com/caarlos0/go-version v0.2.2
7-
github.com/godbus/dbus/v5 v5.1.0
7+
github.com/godbus/dbus/v5 v5.2.2
88
github.com/holoplot/go-avahi v1.0.1
99
github.com/lmittmann/tint v1.1.2
1010
github.com/mattn/go-isatty v0.0.20
11-
github.com/miekg/dns v1.1.68
11+
github.com/miekg/dns v1.1.70
1212
github.com/urfave/cli/v2 v2.27.7
1313
)
1414

1515
require (
1616
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
1717
github.com/russross/blackfriday/v2 v2.1.0 // indirect
1818
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
19-
golang.org/x/mod v0.29.0 // indirect
20-
golang.org/x/net v0.46.0 // indirect
21-
golang.org/x/sync v0.17.0 // indirect
22-
golang.org/x/sys v0.37.0 // indirect
23-
golang.org/x/tools v0.38.0 // indirect
19+
golang.org/x/mod v0.32.0 // indirect
20+
golang.org/x/net v0.49.0 // indirect
21+
golang.org/x/sync v0.19.0 // indirect
22+
golang.org/x/sys v0.40.0 // indirect
23+
golang.org/x/tools v0.41.0 // indirect
2424
)

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ github.com/caarlos0/go-version v0.2.2/go.mod h1:X+rI5VAtJDpcjCjeEIXpxGa5+rTcgur1
33
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
44
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
55
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
6-
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
7-
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
6+
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
7+
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
88
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
99
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1010
github.com/holoplot/go-avahi v1.0.1 h1:XcqR2keL4qWRnlxHD5CAOdWpLFZJ+EOUK0vEuylfvvk=
@@ -13,22 +13,22 @@ github.com/lmittmann/tint v1.1.2 h1:2CQzrL6rslrsyjqLDwD11bZ5OpLBPU+g3G/r5LSfS8w=
1313
github.com/lmittmann/tint v1.1.2/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
1414
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
1515
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
16-
github.com/miekg/dns v1.1.68 h1:jsSRkNozw7G/mnmXULynzMNIsgY2dHC8LO6U6Ij2JEA=
17-
github.com/miekg/dns v1.1.68/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps=
16+
github.com/miekg/dns v1.1.70 h1:DZ4u2AV35VJxdD9Fo9fIWm119BsQL5cZU1cQ9s0LkqA=
17+
github.com/miekg/dns v1.1.70/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs=
1818
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
1919
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
2020
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
2121
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
2222
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg=
2323
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
24-
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
25-
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
26-
golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=
27-
golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210=
28-
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
29-
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
24+
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
25+
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
26+
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
27+
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
28+
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
29+
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
3030
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
31-
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
32-
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
33-
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
34-
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
31+
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
32+
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
33+
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
34+
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=

0 commit comments

Comments
 (0)