all: Bunch of more linter fixes (#5500)

This commit is contained in:
Jakob Borg
2019-02-02 11:02:28 +01:00
committed by GitHub
parent 2111386ee4
commit df5c1eaf01
30 changed files with 118 additions and 117 deletions

View File

@@ -33,7 +33,7 @@ func TestChmodFile(t *testing.T) {
path := filepath.Join(dir, "file")
defer os.RemoveAll(dir)
defer os.Chmod(path, 0666)
defer func() { _ = os.Chmod(path, 0666) }()
fd, err := os.Create(path)
if err != nil {
@@ -74,7 +74,7 @@ func TestChownFile(t *testing.T) {
path := filepath.Join(dir, "file")
defer os.RemoveAll(dir)
defer os.Chmod(path, 0666)
defer func() { _ = os.Chmod(path, 0666) }()
fd, err := os.Create(path)
if err != nil {
@@ -116,7 +116,7 @@ func TestChmodDir(t *testing.T) {
mode = os.FileMode(0777)
}
defer os.Chmod(path, mode)
defer func() { _ = os.Chmod(path, mode) }()
if err := os.Mkdir(path, mode); err != nil {
t.Error(err)
@@ -147,7 +147,7 @@ func TestChtimes(t *testing.T) {
mtime := time.Now().Add(-time.Hour)
fs.Chtimes("file", mtime, mtime)
_ = fs.Chtimes("file", mtime, mtime)
stat, err := os.Stat(path)
if err != nil {