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:
co-authored by
Marko
Julien Robert
parent
15b04c2a87
commit
0943a70215
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user