Skip to content

Commit

Permalink
fixed some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
slr71 committed Dec 19, 2023
1 parent aecf102 commit c0ba13a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions condor.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
Expand Down Expand Up @@ -116,7 +115,7 @@ func (cl *CondorLauncher) storeConfig(s *model.Job) error {
sdir = path.Join(sdir, "logs")
}
fname := path.Join(sdir, "irods-config")
err = ioutil.WriteFile(fname, fileContent.Bytes(), 0644)
err = os.WriteFile(fname, fileContent.Bytes(), 0644)
if err != nil {
return errors.Wrapf(err, "failed to write to file %s", fname)
}
Expand Down
3 changes: 1 addition & 2 deletions fs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"io/ioutil"
"os"
)

Expand All @@ -19,5 +18,5 @@ func (o *osys) MkdirAll(path string, mode os.FileMode) error {
}

func (o *osys) WriteFile(path string, contents []byte, mode os.FileMode) error {
return ioutil.WriteFile(path, contents, mode)
return os.WriteFile(path, contents, mode)
}
9 changes: 7 additions & 2 deletions test/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package test

import (
"fmt"
"io/ioutil"
"io"
"os"
"path"
"runtime"
Expand Down Expand Up @@ -76,7 +76,12 @@ func InitTestsFromFile(t *testing.T, cfg *viper.Viper, filename string) *model.J

// Load the job submission information from the file.
path := getTestFilePath(t, filename)
data, err := ioutil.ReadFile(path)
f, err := os.Open(path)
if err != nil {
t.Error(err)
}
defer f.Close()
data, err := io.ReadAll(f)
if err != nil {
t.Error(err)
}
Expand Down

0 comments on commit c0ba13a

Please sign in to comment.