Skip to content

Commit 0241cdf

Browse files
authored
Merge pull request #165 from vrothberg/upgrade
Upgrade
2 parents a7ca0b3 + 822fb77 commit 0241cdf

File tree

88 files changed

+1042
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1042
-90
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/containers/storage v1.55.0
77
github.com/opencontainers/runc v1.1.13
88
github.com/stretchr/testify v1.9.0
9-
golang.org/x/sys v0.22.0
9+
golang.org/x/sys v0.26.0
1010
)
1111

1212
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
2020
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
2121
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
2222
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
23-
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
24-
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
23+
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
24+
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
2525
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
2626
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2727
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

internal/host/host_nocgo.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !cgo
12
// +build !cgo
23

34
// Copyright 2018 psgo authors
@@ -21,7 +22,7 @@ package host
2122
import (
2223
"encoding/binary"
2324
"fmt"
24-
"io/ioutil"
25+
"os"
2526
"unsafe"
2627
)
2728

@@ -46,7 +47,7 @@ const (
4647

4748
func getFromAuxv(what uint, whatName string) (uint, error) {
4849
dataLen := int(unsafe.Sizeof(int(0)))
49-
p, err := ioutil.ReadFile("/proc/self/auxv")
50+
p, err := os.ReadFile("/proc/self/auxv")
5051
if err != nil {
5152
return 0, err
5253
}

internal/proc/attr.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package proc
1717
import (
1818
"errors"
1919
"fmt"
20-
"io/ioutil"
2120
"os"
2221
"strings"
2322

@@ -27,7 +26,7 @@ import (
2726
// ParseAttrCurrent returns the contents of /proc/$pid/attr/current of "?" if
2827
// labeling is not supported on the host.
2928
func ParseAttrCurrent(pid string) (string, error) {
30-
data, err := ioutil.ReadFile(fmt.Sprintf("/proc/%s/attr/current", pid))
29+
data, err := os.ReadFile(fmt.Sprintf("/proc/%s/attr/current", pid))
3130
if err != nil {
3231
_, err = os.Stat(fmt.Sprintf("/proc/%s", pid))
3332
if errors.Is(err, os.ErrNotExist) || errors.Is(err, unix.ESRCH) {

internal/proc/cmdline.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ package proc
1717
import (
1818
"bytes"
1919
"fmt"
20-
"io/ioutil"
20+
"os"
2121
)
2222

2323
// ParseCmdLine parses a /proc/$pid/cmdline file and returns a string slice.
2424
func ParseCmdLine(pid string) ([]string, error) {
25-
data, err := ioutil.ReadFile(fmt.Sprintf("/proc/%s/cmdline", pid))
25+
data, err := os.ReadFile(fmt.Sprintf("/proc/%s/cmdline", pid))
2626
if err != nil {
2727
return nil, err
2828
}

internal/proc/stat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package proc
1717
import (
1818
"errors"
1919
"fmt"
20-
"io/ioutil"
20+
"os"
2121
"strings"
2222
)
2323

@@ -114,7 +114,7 @@ type Stat struct {
114114

115115
// readStat is used for mocking in unit tests.
116116
var readStat = func(path string) (string, error) {
117-
rawData, err := ioutil.ReadFile(path)
117+
rawData, err := os.ReadFile(path)
118118
if err != nil {
119119
return "", err
120120
}

psgo.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ package psgo
2929
import (
3030
"errors"
3131
"fmt"
32-
"io/ioutil"
3332
"os"
3433
"runtime"
3534
"sort"
@@ -110,7 +109,7 @@ func findID(idStr string, mapping []idtools.IDMap, lookupFunc func(uid string) (
110109
}
111110

112111
// User not found, read the overflow
113-
overflow, err := ioutil.ReadFile(overflowFile)
112+
overflow, err := os.ReadFile(overflowFile)
114113
if err != nil {
115114
return "", err
116115
}

vendor/golang.org/x/sys/LICENSE

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/mkerrors.sh

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)