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

Empty package results in package main when xmlstruct.WithFormatSource(false) #21

Closed
meblum opened this issue Jul 31, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@meblum
Copy link
Contributor

meblum commented Jul 31, 2024

6cf7d4c introduced a regression when generating with

xmlstruct.WithPackageName(""),
xmlstruct.WithFormatSource(false),

The package declaration will now be applied as package main\n\n

@meblum meblum changed the title Regression introduced in 6cf7d4ce7169b58776696163621dc68da4aa38c4 Eplty package results in package main when xmlstruct.WithFormatSource(false) Jul 31, 2024
@meblum
Copy link
Contributor Author

meblum commented Jul 31, 2024

Output is also incorrect when running with

xmlstruct.WithHeader("// do not edit"),
xmlstruct.WithPackageName(""),
xmlstruct.WithFormatSource(true),

@twpayne twpayne added the bug Something isn't working label Jul 31, 2024
@twpayne twpayne self-assigned this Jul 31, 2024
@twpayne
Copy link
Owner

twpayne commented Jul 31, 2024

Thanks for spotting this. Fixed with b980a57.

@twpayne twpayne closed this as completed Jul 31, 2024
@meblum meblum changed the title Eplty package results in package main when xmlstruct.WithFormatSource(false) Empty package results in package main when xmlstruct.WithFormatSource(false) Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants