mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-27 00:30:27 +00:00
*.go: update to golangci-lint, and fix everything
install tools in the workflow actions Also switch away from deprecated ioutil Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
e7a79ae8a7
commit
42b655d8ee
19 changed files with 101 additions and 78 deletions
|
@ -2,7 +2,6 @@ package mtree
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
@ -19,14 +18,14 @@ func TestXattrUpdate(t *testing.T) {
|
|||
content := []byte("I know half of you half as well as I ought to")
|
||||
// a bit dirty to create/destroy a directory in cwd, but often /tmp is
|
||||
// mounted tmpfs and doesn't support xattrs
|
||||
dir, err := ioutil.TempDir(".", "test.xattr.restore.")
|
||||
dir, err := os.MkdirTemp(".", "test.xattr.restore.")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(dir) // clean up
|
||||
|
||||
tmpfn := filepath.Join(dir, "tmpfile")
|
||||
if err := ioutil.WriteFile(tmpfn, content, 0666); err != nil {
|
||||
if err := os.WriteFile(tmpfn, content, 0666); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue