mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-01 17:29:00 +00:00
do not close os.Stdin manually
This commit is contained in:
@@ -487,11 +487,12 @@ func (v *FileVisitor) Visit(fn VisitorFunc) error {
|
||||
f = os.Stdin
|
||||
} else {
|
||||
var err error
|
||||
if f, err = os.Open(v.Path); err != nil {
|
||||
f, err = os.Open(v.Path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
// TODO: Consider adding a flag to force to UTF16, apparently some
|
||||
// Windows tools don't write the BOM
|
||||
|
Reference in New Issue
Block a user