mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
replace ioutil with io and os for pkg/api
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user