remove deprecated use of ioutil (#5205)

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-12-08 14:44:53 +01:00
committed by GitHub
parent 46cb910637
commit 53d15d329e
24 changed files with 57 additions and 67 deletions

View File

@@ -2,7 +2,6 @@ package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
@@ -40,7 +39,7 @@ type templateData struct {
func main() {
fmt.Println("Generating adoc documentation for environment variables:")
content, err := ioutil.ReadFile("../../docs/templates/ADOC.tmpl")
content, err := os.ReadFile("../../docs/templates/ADOC.tmpl")
if err != nil {
log.Fatal(err)
}

View File

@@ -2,7 +2,6 @@ package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
@@ -41,7 +40,7 @@ func main() {
}
func GenerateIntermediateCode(templatePath string, intermediateCodePath string, paths []string) {
content, err := ioutil.ReadFile(templatePath)
content, err := os.ReadFile(templatePath)
if err != nil {
log.Fatal(err)
}

View File

@@ -3,7 +3,6 @@ package main
import (
"fmt"
"html"
"io/ioutil"
"log"
"os"
"path/filepath"
@@ -24,7 +23,7 @@ type ConfigField struct {
func main() {
fmt.Println("Generating documentation for environment variables:")
content, err := ioutil.ReadFile("../../docs/templates/CONFIGURATION.tmpl")
content, err := os.ReadFile("../../docs/templates/CONFIGURATION.tmpl")
if err != nil {
log.Fatal(err)
}