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

Return error instead of using log.Fatal #380

Merged
merged 1 commit into from
Sep 25, 2018

Conversation

hairyhenderson
Copy link
Owner

@hairyhenderson hairyhenderson commented Aug 25, 2018

I took a detour when working on #379, because this has become a pretty major issue and I just want to get it fixed once and for all.

Turns out using log.Fatal from template functions was a terrible idea. Makes it much harder to properly handle/display/track errors, and text/template handles them decently anyway.

The basic goal here is to remove all uses of log.Fatal or log.Fatalf, and instead change function signatures to return errors instead.

Signed-off-by: Dave Henderson [email protected]

@hairyhenderson hairyhenderson self-assigned this Aug 25, 2018
@hairyhenderson hairyhenderson force-pushed the return-error-from-funcs branch from 3ce3bdb to da3f87f Compare August 28, 2018 12:31
@hairyhenderson hairyhenderson force-pushed the return-error-from-funcs branch 10 times, most recently from cb56b04 to 9ef8978 Compare September 19, 2018 02:50
@hairyhenderson hairyhenderson changed the title [WIP] Return error instead of using log.Fatal Return error instead of using log.Fatal Sep 19, 2018
@hairyhenderson hairyhenderson force-pushed the return-error-from-funcs branch 10 times, most recently from f5e9f2c to 9c525f3 Compare September 24, 2018 14:24
@hairyhenderson hairyhenderson merged commit 6522752 into master Sep 25, 2018
@hairyhenderson hairyhenderson deleted the return-error-from-funcs branch September 25, 2018 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant