Do not expose internal CPU profiling option as flag (#136)

This commit is contained in:
Yann Hamon 2022-10-16 14:06:42 +02:00 committed by GitHub
parent f5338b07f9
commit dbcd787256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -69,8 +69,9 @@ func realMain() int {
return 1
}
if cfg.CPUProfileFile != "" {
f, err := os.Create(cfg.CPUProfileFile)
cpuProfileFile := os.Getenv("KUBECONFORM_CPUPROFILE_FILE")
if cpuProfileFile != "" {
f, err := os.Create(cpuProfileFile)
if err != nil {
log.Fatal("could not create CPU profile: ", err)
}