io/ioutil deprecated (#3217)

This commit is contained in:
guangwu
2023-05-06 17:50:54 +08:00
committed by GitHub
parent 4f13fe8188
commit 63368d8b0c
27 changed files with 85 additions and 89 deletions

View File

@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
@@ -171,7 +170,7 @@ func downloadFile(filepath, url string) error {
// NewPlugin returns contextual resources when written in other languages
func NewPlugin() (*Plugin, error) {
var plugin Plugin
content, err := ioutil.ReadAll(os.Stdin)
content, err := io.ReadAll(os.Stdin)
if err != nil {
return nil, err
}