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
|
@ -4,7 +4,6 @@
|
|||
package mtree
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
@ -21,7 +20,7 @@ func TestXattr(t *testing.T) {
|
|||
// xattrs
|
||||
testDir = "."
|
||||
}
|
||||
dir, err := ioutil.TempDir(testDir, "test.xattrs.")
|
||||
dir, err := os.MkdirTemp(testDir, "test.xattrs.")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -30,8 +29,14 @@ func TestXattr(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fh.WriteString("howdy")
|
||||
fh.Sync()
|
||||
_, err = fh.WriteString("howdy")
|
||||
if err != nil {
|
||||
t.Errorf("failed to write string: %s", err)
|
||||
}
|
||||
err = fh.Sync()
|
||||
if err != nil {
|
||||
t.Errorf("failed to sync file: %s", err)
|
||||
}
|
||||
if _, err := fh.Seek(0, 0); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue