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

Shrink main package #110

Merged
merged 5 commits into from
Jan 8, 2019
Merged

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Dec 28, 2018

Full description in the commit message.

One of the stated goals in the readme of this project is to keep main small. I noticed some duplicate code and unused function in main that could be cleaned up.

Stdout should only contain output that is requested by the user.
Messages like "Writing" and "Done" are logs which should not be
on stdout.
os.Exit should only be called from the main() function. If it is
called from other functions then defers will not run before the
program exits.

Also use a string for cwd instead of a function. The value should
not change, so there is no need to make the value lazy.
@joefitzgerald joefitzgerald changed the title Shrink main pacakge Shrink main package Jan 8, 2019
@joefitzgerald joefitzgerald merged commit ba8beb0 into maxbrunsfeld:master Jan 8, 2019
@dnephin dnephin deleted the shrink-main branch January 8, 2019 16:09
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

Successfully merging this pull request may close these issues.

2 participants