remove io/ioutil for advanced golang (#951)

Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
yanggang
2022-11-09 23:18:54 +08:00
committed by GitHub
parent 77e0150afe
commit 4f91106f29
20 changed files with 45 additions and 59 deletions

View File

@@ -19,7 +19,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
@@ -55,7 +54,7 @@ func NewFakeNetAttachDefFile(namespace, name, filePath, fileData string) *netv1.
Namespace: namespace,
},
}
err := ioutil.WriteFile(filePath, []byte(fileData), 0600)
err := os.WriteFile(filePath, []byte(fileData), 0600)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
return netAttach
}