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

Rename package to ctp by changing locations #25

Closed
jolheiser opened this issue Oct 23, 2022 · 8 comments · Fixed by #29
Closed

Rename package to ctp by changing locations #25

jolheiser opened this issue Oct 23, 2022 · 8 comments · Fixed by #29

Comments

@jolheiser
Copy link
Member

Optional, but raising an issue since we spoke about it in Discord.

Perhaps the current cmd directory could be moved to internal, and we could move main.go to cmd/ctp

This would mean that building would no longer strictly require the -o flag, and go install would work out of the box.

@ghostx31
Copy link
Member

Yes this makes the building process cleaner. I'll add this to the README!

@jolheiser
Copy link
Member Author

The other option is to rename the repo (and module) to ctp.

@DakshG07
Copy link
Contributor

Hm. Would Cobra like this?

@jolheiser
Copy link
Member Author

Cobra the library is agnostic.
Cobra the CLI tool is what jams everything into cmd.

@DakshG07 DakshG07 changed the title Refactor cmd Rename package to ctp by changing locations Oct 31, 2022
@DakshG07
Copy link
Contributor

Updated for clarity.

@DakshG07
Copy link
Contributor

Any idea how we could implement this? I’m not familiar with how this works.

@jolheiser
Copy link
Member Author

Any idea how we could implement this? I’m not familiar with how this works.

Absolutely. I will open a draft PR when I have a chance to show a possible layout.

The tl;dr is that everything in cmd would be moved somewhere like internal/cli (example) and then main.go is moved to cmd/ctp/main.go
There would need to be some docs changes as well as goreleaser, but after that go build cmd/ctp and go install github.com/catppuccin/cmd/ctp would create a binary called ctp by default.

@jolheiser
Copy link
Member Author

Resolved by #29

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 a pull request may close this issue.

3 participants