mirror of https://github.com/docker/cli.git
docs/yaml: remove deprecated io/ioutil and use t.TempDir()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 39ace68061
)
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
parent
f471347d88
commit
58d486bac7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue