Skip to content

Commit

Permalink
Merge pull request #165 from vrothberg/upgrade
Browse files Browse the repository at this point in the history
Upgrade
  • Loading branch information
vrothberg authored Oct 7, 2024
2 parents a7ca0b3 + 822fb77 commit 0241cdf
Show file tree
Hide file tree
Showing 88 changed files with 1,042 additions and 90 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/containers/storage v1.55.0
github.com/opencontainers/runc v1.1.13
github.com/stretchr/testify v1.9.0
golang.org/x/sys v0.22.0
golang.org/x/sys v0.26.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
5 changes: 3 additions & 2 deletions internal/host/host_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !cgo
// +build !cgo

// Copyright 2018 psgo authors
Expand All @@ -21,7 +22,7 @@ package host
import (
"encoding/binary"
"fmt"
"io/ioutil"
"os"
"unsafe"
)

Expand All @@ -46,7 +47,7 @@ const (

func getFromAuxv(what uint, whatName string) (uint, error) {
dataLen := int(unsafe.Sizeof(int(0)))
p, err := ioutil.ReadFile("/proc/self/auxv")
p, err := os.ReadFile("/proc/self/auxv")
if err != nil {
return 0, err
}
Expand Down
3 changes: 1 addition & 2 deletions internal/proc/attr.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package proc
import (
"errors"
"fmt"
"io/ioutil"
"os"
"strings"

Expand All @@ -27,7 +26,7 @@ import (
// ParseAttrCurrent returns the contents of /proc/$pid/attr/current of "?" if
// labeling is not supported on the host.
func ParseAttrCurrent(pid string) (string, error) {
data, err := ioutil.ReadFile(fmt.Sprintf("/proc/%s/attr/current", pid))
data, err := os.ReadFile(fmt.Sprintf("/proc/%s/attr/current", pid))
if err != nil {
_, err = os.Stat(fmt.Sprintf("/proc/%s", pid))
if errors.Is(err, os.ErrNotExist) || errors.Is(err, unix.ESRCH) {
Expand Down
4 changes: 2 additions & 2 deletions internal/proc/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package proc
import (
"bytes"
"fmt"
"io/ioutil"
"os"
)

// ParseCmdLine parses a /proc/$pid/cmdline file and returns a string slice.
func ParseCmdLine(pid string) ([]string, error) {
data, err := ioutil.ReadFile(fmt.Sprintf("/proc/%s/cmdline", pid))
data, err := os.ReadFile(fmt.Sprintf("/proc/%s/cmdline", pid))
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions internal/proc/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package proc
import (
"errors"
"fmt"
"io/ioutil"
"os"
"strings"
)

Expand Down Expand Up @@ -114,7 +114,7 @@ type Stat struct {

// readStat is used for mocking in unit tests.
var readStat = func(path string) (string, error) {
rawData, err := ioutil.ReadFile(path)
rawData, err := os.ReadFile(path)
if err != nil {
return "", err
}
Expand Down
3 changes: 1 addition & 2 deletions psgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ package psgo
import (
"errors"
"fmt"
"io/ioutil"
"os"
"runtime"
"sort"
Expand Down Expand Up @@ -110,7 +109,7 @@ func findID(idStr string, mapping []idtools.IDMap, lookupFunc func(uid string) (
}

// User not found, read the overflow
overflow, err := ioutil.ReadFile(overflowFile)
overflow, err := os.ReadFile(overflowFile)
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/golang.org/x/sys/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions vendor/golang.org/x/sys/unix/mkerrors.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/syscall_aix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions vendor/golang.org/x/sys/unix/syscall_darwin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/golang.org/x/sys/unix/syscall_hurd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 63 additions & 1 deletion vendor/golang.org/x/sys/unix/syscall_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/golang.org/x/sys/unix/syscall_linux_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/golang.org/x/sys/unix/syscall_linux_loong64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/golang.org/x/sys/unix/syscall_openbsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/golang.org/x/sys/unix/vgetrandom_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0241cdf

Please sign in to comment.