-
Notifications
You must be signed in to change notification settings - Fork 37
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
bundle: rearrange embed.FS setup #279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an interesting approach, and not one I had considered :)
Having a .go
file in the bundle may not be koscher, but yeah, it should just get ignored.
// it's preferable to filter them out from the bundle than to e.g. create a separate directory for tests | ||
// | ||
//go:embed * | ||
var Bundle embed.FS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: ST1022: comment on exported var Bundle should be of the form "Bundle ..." (stylecheck)
Adding an ignore on package level should be fine here.
0ba0c6f
to
72de5de
Compare
@@ -94,7 +94,7 @@ func CloseFileIgnore(file *os.File) { | |||
} | |||
|
|||
func ExcludeTestFilter() filter.LoaderFilter { | |||
return func(abspath string, info files.FileInfo, depth int) bool { | |||
return func(_ string, info files.FileInfo, _ int) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, unrelated change. I had just happened to look into how the bundle is loaded...
Tests fail, back to draft. I'm looking into it. |
No functional changes, I hope! Signed-off-by: Stephan Renatus <stephan@styra.com>
72de5de
to
88b0209
Compare
No functional changes, I hope! Signed-off-by: Stephan Renatus <stephan@styra.com>
No functional changes, I hope!