From e4aa8ad269b6fa09092612f33180b8d2cc03a68a Mon Sep 17 00:00:00 2001 From: James Coleman Date: Tue, 11 Aug 2026 07:06:14 -0500 Subject: [PATCH] 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. --- go.mod | 4 +--- services_linux.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c423ba3..2031667 100644 --- a/go.mod +++ b/go.mod @@ -2,12 +2,10 @@ module github.com/grmrgecko/go-network-configurator go 1.24.2 -replace github.com/coreos/go-systemd => github.com/coreos/go-systemd/v22 v22.5.0 - require ( dario.cat/mergo v1.0.2 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/kylelemons/godebug v1.1.0 github.com/prometheus-community/pro-bing v0.7.0 diff --git a/services_linux.go b/services_linux.go index 59daf97..5403f99 100644 --- a/services_linux.go +++ b/services_linux.go @@ -9,7 +9,7 @@ import ( "path/filepath" "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.