Skip to content

Commit

Permalink
chore(conn): remove uses of ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
guelfey committed Sep 21, 2024
1 parent 33c352a commit ae4f490
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions conn_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package dbus

import (
"bufio"
"io/ioutil"
"os"
"os/exec"
"syscall"
Expand Down Expand Up @@ -46,7 +45,7 @@ func startDaemonInDifferentUserNamespace(t *testing.T) (string, *os.Process) {
</policy>
</busconfig>
`
cfg, err := ioutil.TempFile("", "")
cfg, err := os.CreateTemp("", "")
if err != nil {
t.Fatal(err)
}
Expand Down
3 changes: 1 addition & 2 deletions conn_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"os/user"
Expand Down Expand Up @@ -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="
Expand Down

0 comments on commit ae4f490

Please sign in to comment.