Skip to content

Commit

Permalink
Merge pull request #2 from ripienaar/go_118
Browse files Browse the repository at this point in the history
resolve go 1.18 deprecations
  • Loading branch information
aelsabbahy authored Jan 1, 2023
2 parents 4fdf99a + 9f49cc3 commit 953ade4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @aelsabbahy
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.vagrant/
.idea
*.swp
*.bak
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: go

go:
- 1.2.1
- 1.18
5 changes: 3 additions & 2 deletions process_linux.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
//go:build linux
// +build linux

package ps

import (
"fmt"
"io/ioutil"
"os"
"strings"
)

// Refresh reloads all the data associated with this process.
func (p *UnixProcess) Refresh() error {
statPath := fmt.Sprintf("/proc/%d/stat", p.pid)
dataBytes, err := ioutil.ReadFile(statPath)
dataBytes, err := os.ReadFile(statPath)
if err != nil {
return err
}
Expand Down

0 comments on commit 953ade4

Please sign in to comment.