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

fatal exit without defer #277

Closed
maddin200 opened this issue Jun 27, 2023 · 2 comments
Closed

fatal exit without defer #277

maddin200 opened this issue Jun 27, 2023 · 2 comments

Comments

@maddin200
Copy link

/cmd\dicomutil\main.go line 67
Code:
if err != nil {
log.Fatalf("error parsing data: %v", err) // <-- will not use defer
}

@suyashkumar
Copy link
Owner

suyashkumar commented Jul 2, 2023

I think you are pointing out that log.Fatalf exits the example dicomutil program without running the defered functions? Thanks for pointing it out, I'll make some updates in #278 (probably dicomutil in general could use a refactor to be honest).

@suyashkumar
Copy link
Owner

Addressed in dicomutil in #278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants