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

Panic if file is missing package declaration #99

Open
twavv opened this issue Mar 30, 2023 · 1 comment
Open

Panic if file is missing package declaration #99

twavv opened this issue Mar 30, 2023 · 1 comment

Comments

@twavv
Copy link

twavv commented Mar 30, 2023

This is probably related to an upstream issue in dave/dst but wanted to flag it here at least just so it's findable if anyone else ever runs into this.

Found this error when the first line of the file was import ( (instead of the usual package <foo> declaration).

@telemachus
Copy link
Contributor

telemachus commented Mar 31, 2023

I can't reproduce this. In a folder with only one file and with no package declaration, golines doesn't panic for me.

Can you provide a minimum example that leads to the panic? (Also what version of golines and go are you using?)

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

No branches or pull requests

2 participants