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

feat: add WithImports option #32

Merged
merged 2 commits into from
Aug 20, 2024
Merged

feat: add WithImports option #32

merged 2 commits into from
Aug 20, 2024

Conversation

twpayne
Copy link
Owner

@twpayne twpayne commented Aug 20, 2024

Fixes #31.

@meblum does this look reasonable? You'll need to set the WithImports(false) option in your code.

@meblum
Copy link
Contributor

meblum commented Aug 20, 2024

Wow, you're quick :) From a usability perspective, instead of WithImports(false), perhaps there should be single option that does the equivalent of WithImports(false) WithHeader("") WithPackageName("") ? I don't see the use case of someone setting WithImports(false) but still want a package declaration.

@meblum
Copy link
Contributor

meblum commented Aug 20, 2024

I mean, for the library, that's not a big deal it can stay the way it is, but for the cli it should probably be combined as a single option.

@twpayne
Copy link
Owner Author

twpayne commented Aug 20, 2024

Good idea. Something like -types-only as in 36cb37a?

@meblum
Copy link
Contributor

meblum commented Aug 20, 2024

Yes! Thanks so much!!!

@twpayne twpayne marked this pull request as ready for review August 20, 2024 22:02
@twpayne twpayne merged commit 8fd92aa into master Aug 20, 2024
3 checks passed
@twpayne twpayne deleted the fix-31 branch August 20, 2024 22:03
@twpayne
Copy link
Owner Author

twpayne commented Aug 20, 2024

OK, done. Tagged v1.6.0 with these extra options and flags. Thank you very much for your work here!

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.

Exclude import statements when package name is empty
2 participants