mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-08 08:31:41 +02:00
remove ioutil usage in all project
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"strings"
|
||||
@@ -79,9 +79,9 @@ func unmarshal(filename string) (interface{}, error) {
|
||||
var contents []byte
|
||||
var err error
|
||||
if filename == "-" {
|
||||
contents, err = ioutil.ReadAll(os.Stdin)
|
||||
contents, err = io.ReadAll(os.Stdin)
|
||||
} else {
|
||||
contents, err = ioutil.ReadFile(filename)
|
||||
contents, err = os.ReadFile(filename)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user