-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support generating structs only, without package decleration. #18
Comments
If there is no |
Right, I'd like to append the output to an existing go file. |
OK, but why append? What is the specific case where multiple source files does not work? |
Say I have an existing go file and I just need to add a few types. Currently I'd need to manually strip the package declaration. Happy to submit a PR |
In this case the few types can be added in a separate Go source file in the same package. What is your specific workflow that requires appending? Note that:
|
I don't like separating the types from the function that use them.
I have an existing package where I want to add some type. It's a one-time addition, not based on a ci/cd workflow.
Omitting the package line where en empty string is supplied as the package name is not a breaking change, as currently it will output just "package" which is not valid either. |
Good point. OK happy to accept a PR for this :) |
Thanks for the PRs. I've pushed a new version with tag |
Thanks to you! Appreciate it. |
An empty string as package name should be treated as a "no-package" remove the
package ...
line.The text was updated successfully, but these errors were encountered: