From 58d486bac79a2aa775d25a4d3443536086ec0141 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Feb 2022 15:31:47 +0100 Subject: [PATCH] docs/yaml: remove deprecated io/ioutil and use t.TempDir() Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 39ace680617ae003ba4d7894e086aa70dded3f1a) Signed-off-by: Cory Snider --- docs/yaml/generate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/yaml/generate.go b/docs/yaml/generate.go index ff451c1920..f3d8d42dcb 100644 --- a/docs/yaml/generate.go +++ b/docs/yaml/generate.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "io/ioutil" "log" "os" "path/filepath" @@ -72,7 +71,7 @@ func loadLongDescription(parentCmd *cobra.Command, path string) error { } mdFile := strings.ReplaceAll(name, " ", "_") + ".md" fullPath := filepath.Join(path, mdFile) - content, err := ioutil.ReadFile(fullPath) + content, err := os.ReadFile(fullPath) if os.IsNotExist(err) { log.Printf("WARN: %s does not exist, skipping\n", mdFile) continue