Apply linter autofixes: cmd/vaultik (refs #61)

This commit is contained in:
2026-08-07 16:53:19 +00:00
parent 04fce150bc
commit d34868a9c4

View File

@@ -16,9 +16,11 @@ func main() {
panic("could not create CPU profile: " + err.Error())
}
defer func() { _ = f.Close() }()
if err := pprof.StartCPUProfile(f); err != nil {
panic("could not start CPU profile: " + err.Error())
}
defer pprof.StopCPUProfile()
}
@@ -30,7 +32,9 @@ func main() {
panic("could not create memory profile: " + err.Error())
}
defer func() { _ = f.Close() }()
runtime.GC() // get up-to-date statistics
if err := pprof.WriteHeapProfile(f); err != nil {
panic("could not write memory profile: " + err.Error())
}