Import go-systemd under its real v22 module path

The systemd service backend imported github.com/coreos/go-systemd while
calling v22-only API, and compiled only because of a local replace onto
the v22 module. Replace directives are ignored outside the main module,
so every consumer had to mirror that replace, and a consumer that also
requires go-systemd/v22 directly could not build at all: Go rejects one
module serving two import paths.

Import github.com/coreos/go-systemd/v22/dbus directly and drop the
replace.
This commit is contained in:
James Coleman 2026-08-11 07:06:14 -05:00
parent fae43247de
commit e4aa8ad269
2 changed files with 2 additions and 4 deletions

4
go.mod
View file

@ -2,12 +2,10 @@ module github.com/grmrgecko/go-network-configurator
go 1.24.2 go 1.24.2
replace github.com/coreos/go-systemd => github.com/coreos/go-systemd/v22 v22.5.0
require ( require (
dario.cat/mergo v1.0.2 dario.cat/mergo v1.0.2
github.com/Wifx/gonetworkmanager/v3 v3.2.0 github.com/Wifx/gonetworkmanager/v3 v3.2.0
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/coreos/go-systemd/v22 v22.5.0
github.com/godbus/dbus/v5 v5.1.0 github.com/godbus/dbus/v5 v5.1.0
github.com/kylelemons/godebug v1.1.0 github.com/kylelemons/godebug v1.1.0
github.com/prometheus-community/pro-bing v0.7.0 github.com/prometheus-community/pro-bing v0.7.0

View file

@ -9,7 +9,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
dbus "github.com/coreos/go-systemd/dbus" dbus "github.com/coreos/go-systemd/v22/dbus"
) )
// rcRunlevels are the SysV runlevels a network service can be started in. // rcRunlevels are the SysV runlevels a network service can be started in.