replace ioutil with io and os for pkg/api

This commit is contained in:
ahrtr
2021-10-30 14:49:09 +08:00
parent fc6890f902
commit e8a0289455
3 changed files with 9 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ limitations under the License.
package testing
import (
"io/ioutil"
"os"
"testing"
"time"
@@ -140,7 +140,7 @@ func BenchmarkPodCopy(b *testing.B) {
}
func BenchmarkNodeCopy(b *testing.B) {
data, err := ioutil.ReadFile("node_example.json")
data, err := os.ReadFile("node_example.json")
if err != nil {
b.Fatalf("Unexpected error while reading file: %v", err)
}
@@ -159,7 +159,7 @@ func BenchmarkNodeCopy(b *testing.B) {
}
func BenchmarkReplicationControllerCopy(b *testing.B) {
data, err := ioutil.ReadFile("replication_controller_example.json")
data, err := os.ReadFile("replication_controller_example.json")
if err != nil {
b.Fatalf("Unexpected error while reading file: %v", err)
}