From 39ace680617ae003ba4d7894e086aa70dded3f1a 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 --- 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 da8bd08c96..1e0472c39c 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" @@ -76,7 +75,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