mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Fix missing close file
This commit is contained in:
parent
5dd56c9b1e
commit
ae7bf3e649
@ -167,6 +167,7 @@ func TestUtilSaveConfig(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("failed to open conf file: ", file)
|
t.Fatal("failed to open conf file: ", file)
|
||||||
}
|
}
|
||||||
|
defer file.Close()
|
||||||
dataRcvd := map[string]string{}
|
dataRcvd := map[string]string{}
|
||||||
if err := gob.NewDecoder(file).Decode(&dataRcvd); err != nil {
|
if err := gob.NewDecoder(file).Decode(&dataRcvd); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user