Panic if file is missing `package` declaration
twavv opened this issue · comments
Travis DePrato commented
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).
Peter Aronoff commented
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?)