refactor: replace the ioutil by the os and io

Signed-off-by: saltbo <saltbo@foxmail.com>
This commit is contained in:
saltbo
2022-10-20 15:13:28 +08:00
parent 0a689af469
commit cc90e819bc
7 changed files with 18 additions and 27 deletions

View File

@@ -20,7 +20,6 @@ limitations under the License.
package procfs
import (
"io/ioutil"
"os"
"os/signal"
"path/filepath"
@@ -56,7 +55,7 @@ func TestContainerNameFromProcCgroup(t *testing.T) {
procCgroupEmpty := ""
verifyContainerName(procCgroupEmpty, "", true, t)
content, err := ioutil.ReadFile("example_proc_cgroup")
content, err := os.ReadFile("example_proc_cgroup")
if err != nil {
t.Errorf("Could not read example /proc cgroup file")
}