remove deprecated ioutil
This commit is contained in:
parent
071ebba4ae
commit
50ff4ba0ac
2 changed files with 2 additions and 4 deletions
|
|
@ -16,7 +16,6 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
|
@ -124,7 +123,7 @@ func (a *Agent) RunScript(code string, shell string, args []string, timeout int,
|
|||
tmpDir = a.WinRunAsUserTmpDir
|
||||
}
|
||||
|
||||
tmpfn, err := ioutil.TempFile(tmpDir, ext)
|
||||
tmpfn, err := os.CreateTemp(tmpDir, ext)
|
||||
if err != nil {
|
||||
a.Logger.Errorln(err)
|
||||
return "", err.Error(), 85, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue