diff --git a/conn_linux_test.go b/conn_linux_test.go index 2c13545..adcca19 100644 --- a/conn_linux_test.go +++ b/conn_linux_test.go @@ -2,7 +2,6 @@ package dbus import ( "bufio" - "io/ioutil" "os" "os/exec" "syscall" @@ -46,7 +45,7 @@ func startDaemonInDifferentUserNamespace(t *testing.T) (string, *os.Process) { ` - cfg, err := ioutil.TempFile("", "") + cfg, err := os.CreateTemp("", "") if err != nil { t.Fatal(err) } diff --git a/conn_other.go b/conn_other.go index 067e67c..1e99594 100644 --- a/conn_other.go +++ b/conn_other.go @@ -7,7 +7,6 @@ import ( "bytes" "errors" "fmt" - "io/ioutil" "os" "os/exec" "os/user" @@ -61,7 +60,7 @@ func tryDiscoverDbusSessionBusAddress() string { // text file // containing the address of the socket, e.g.: // DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-E1c73yNqrG - if f, err := ioutil.ReadFile(runUserSessionDbusFile); err == nil { + if f, err := os.ReadFile(runUserSessionDbusFile); err == nil { fileContent := string(f) prefix := "DBUS_SESSION_BUS_ADDRESS="