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: move main to the cmd #31

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Conversation

mojtaba-esk
Copy link
Member

Closes #6

@mojtaba-esk mojtaba-esk requested review from ramin, MSevey and a team December 1, 2023 16:50
@mojtaba-esk mojtaba-esk self-assigned this Dec 1, 2023
Copy link

@ramin ramin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd/cmd feels clumsy to me, usually the pattern is to have the named output binary under cmd, so in this case, some ideas

cmd/bittwister/root.go
cmd/cli/root.go
cmd/server/root.go

something like that, i'm also of the mind that thing not related to the provisioning of the cmd should be in a package above, ie

/commands/utils/utils.go
/utils/{utils.go,cmd.go}

or similar if they can't be named.

If there is only one output binary, why not name it after the tool itself? bittwister?

@mojtaba-esk
Copy link
Member Author

bittwister

yes bittwister makes sense as there is only one output binary

Copy link
Member

@Bidon15 Bidon15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mojtaba-esk mojtaba-esk merged commit 702a1cb into main Dec 5, 2023
8 of 9 checks passed
@mojtaba-esk mojtaba-esk deleted the mojtaba/move-main-to-cmd-pkg branch December 5, 2023 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

refactor suggestions: move main to the cmd pkg
4 participants