remove io/ioutil

Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
This commit is contained in:
宁明晓10296073
2022-01-11 15:40:07 +08:00
parent 62a4e7020d
commit b35fb7d447
3 changed files with 6 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"os"
"path/filepath"
goruntime "runtime"
@@ -196,7 +196,7 @@ func (manager) Start(ctx context.Context, id string, opts shim.StartOpts) (_ str
}()
// make sure to wait after start
go cmd.Wait()
if data, err := ioutil.ReadAll(os.Stdin); err == nil {
if data, err := io.ReadAll(os.Stdin); err == nil {
if len(data) > 0 {
var any ptypes.Any
if err := proto.Unmarshal(data, &any); err != nil {