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

bundle: rearrange embed.FS setup #279

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

srenatus
Copy link
Member

No functional changes, I hope!

Copy link
Member

@anderseknert anderseknert left a 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
Copy link
Member

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.

@@ -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 {
Copy link
Member Author

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...

@srenatus srenatus marked this pull request as draft August 30, 2023 11:18
@srenatus
Copy link
Member Author

Tests fail, back to draft. I'm looking into it.

No functional changes, I hope!

Signed-off-by: Stephan Renatus <stephan@styra.com>
@srenatus srenatus marked this pull request as ready for review August 30, 2023 11:33
@anderseknert anderseknert merged commit a554c3e into StyraInc:main Aug 30, 2023
1 check passed
@srenatus srenatus deleted the sr/rearrange-embeds branch August 30, 2023 11:41
srenatus added a commit to srenatus/regal that referenced this pull request Oct 1, 2024
No functional changes, I hope!

Signed-off-by: Stephan Renatus <stephan@styra.com>
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

Successfully merging this pull request may close these issues.

2 participants