Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: do things for the devil #1208

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmds/ocm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
)

func main() {
println("start")
defer func() {
println("end")
}()
c, err := app.NewCliCommandForArgs(clictx.DefaultContext(), os.Args[1:])
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %s\n", err.Error())
os.Exit(1)

Check failure on line 19 in cmds/ocm/main.go

View workflow job for this annotation

GitHub Actions / Lint Golang

exitAfterDefer: os.Exit will exit, and `defer func(){...}(...)` will not run (gocritic)
}
if err := c.Execute(); err != nil {
os.Exit(1)
Expand Down
Loading