diff options
author | Bryan McNulty <bryanmcnulty@protonmail.com> | 2025-04-26 05:18:48 -0500 |
---|---|---|
committer | Bryan McNulty <bryanmcnulty@protonmail.com> | 2025-04-26 05:18:48 -0500 |
commit | 7770ce5c15dff99c1100f9fe6e41c502a94cd713 (patch) | |
tree | 3aef1a4d027cecece4fc833af0777357334929e3 /cmd/root.go | |
parent | 00205e02bd1768254e5ee2519cf7027cbcab5ee6 (diff) | |
download | goexec-7770ce5c15dff99c1100f9fe6e41c502a94cd713.tar.gz goexec-7770ce5c15dff99c1100f9fe6e41c502a94cd713.zip |
Fixed some more linter issues
Diffstat (limited to 'cmd/root.go')
-rw-r--r-- | cmd/root.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd/root.go b/cmd/root.go index 12f3e19..a66fa62 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -60,9 +60,9 @@ var ( toClose []io.Closer // === IO === - stageFilePath string - outputMethod string - outputPath string + //stageFilePath string // FUTURE + outputMethod string + outputPath string // ========== // === Logging === @@ -196,6 +196,12 @@ Authors: FalconOps LLC (@FalconOpsLLC), pprof.StopCPUProfile() } + if exec.Input != nil && exec.Input.StageFile != nil { + if err := exec.Input.StageFile.Close(); err != nil { + log.Warn().Err(err).Msg("Failed to close stage file") + } + } + for _, c := range toClose { if c != nil { if err := c.Close(); err != nil { @@ -203,12 +209,6 @@ Authors: FalconOps LLC (@FalconOpsLLC), } } } - - if exec.Input != nil && exec.Input.StageFile != nil { - if err := exec.Input.StageFile.Close(); err != nil { - // ... - } - } }, } ) |