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>
This commit is contained in:
parent
0e3197ebd4
commit
39ace68061
|
@ -2,7 +2,6 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -76,7 +75,7 @@ func loadLongDescription(parentCmd *cobra.Command, path string) error {
|
||||||
}
|
}
|
||||||
mdFile := strings.ReplaceAll(name, " ", "_") + ".md"
|
mdFile := strings.ReplaceAll(name, " ", "_") + ".md"
|
||||||
fullPath := filepath.Join(path, mdFile)
|
fullPath := filepath.Join(path, mdFile)
|
||||||
content, err := ioutil.ReadFile(fullPath)
|
content, err := os.ReadFile(fullPath)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
log.Printf("WARN: %s does not exist, skipping\n", mdFile)
|
log.Printf("WARN: %s does not exist, skipping\n", mdFile)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue