We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db8f4ad commit 384b9f7Copy full SHA for 384b9f7
internal/pkg/config/config.go
@@ -91,7 +91,13 @@ func InitConfig() {
91
cobra.CheckErr(err)
92
}
93
94
- defer f.Close() //nolint:errcheck // file close errors are hard to handle
+ defer func() {
95
+ if f != nil {
96
+ if err := f.Close(); err != nil {
97
+ cobra.CheckErr(err)
98
+ }
99
100
+ }()
101
102
setConfigDefaults()
103
0 commit comments