From 2a8e435671186bead0e02b13f55e118724175cce Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 22 Apr 2022 11:51:53 +0200 Subject: enable staticcheck linter Fix many problems reported by the staticcheck linter, including many real bugs! Signed-off-by: Paul Holzinger --- pkg/systemd/dbus.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/systemd') diff --git a/pkg/systemd/dbus.go b/pkg/systemd/dbus.go index 44feb8308..b35f778ab 100644 --- a/pkg/systemd/dbus.go +++ b/pkg/systemd/dbus.go @@ -1,6 +1,7 @@ package systemd import ( + "context" "fmt" "os" "path/filepath" @@ -140,5 +141,5 @@ func ConnectToDBUS() (*dbus.Conn, error) { if rootless.IsRootless() { return newRootlessConnection() } - return dbus.NewSystemdConnection() + return dbus.NewSystemdConnectionContext(context.Background()) } -- cgit v1.2.3-54-g00ecf