chore: fix linting issues exposed by fixing golangci-lint (#12895)

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Jacob Gadikian
2022-08-11 22:00:24 +02:00
committed by GitHub
co-authored by Marko Julien Robert
parent 15b04c2a87
commit 0943a70215
148 changed files with 570 additions and 468 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ package config
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"text/template"
@@ -280,7 +279,7 @@ func WriteConfigFile(configFilePath string, config interface{}) {
}
func mustWriteFile(filePath string, contents []byte, mode os.FileMode) {
if err := ioutil.WriteFile(filePath, contents, mode); err != nil {
if err := os.WriteFile(filePath, contents, mode); err != nil {
fmt.Printf(fmt.Sprintf("failed to write file: %v", err) + "\n")
os.Exit(1)
}