refactor(plugins): replace deprecated io/ioutil functions
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. [1]: https://golang.org/doc/go1.16#ioutil Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -104,8 +104,8 @@ func PlugnTriggerOutput(triggerName string, args ...string) ([]byte, error) {
|
||||
wE.Close()
|
||||
wO.Close()
|
||||
|
||||
readStderr, _ := ioutil.ReadAll(rE)
|
||||
readStdout, _ := ioutil.ReadAll(rO)
|
||||
readStderr, _ := io.ReadAll(rE)
|
||||
readStdout, _ := io.ReadAll(rO)
|
||||
|
||||
stderr := string(readStderr[:])
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user