Merge pull request #15371 from bboreham/main-naming

[REFACTOR] Small improvement to top-level naming
pull/15447/head
Bryan Boreham 2024-11-24 17:55:10 +00:00 committed by GitHub
commit dd1d707e1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -1369,10 +1369,12 @@ func main() {
}, },
) )
} }
if err := g.Run(); err != nil { func() { // This function exists so the top of the stack is named 'main.main.funcxxx' and not 'oklog'.
logger.Error("Error running goroutines from run.Group", "err", err) if err := g.Run(); err != nil {
os.Exit(1) logger.Error("Fatal error", "err", err)
} os.Exit(1)
}
}()
logger.Info("See you next time!") logger.Info("See you next time!")
} }