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

Allow custom rules to be provided with raw contents / via an fs.FS #492

Closed
jamietanna opened this issue Nov 25, 2023 · 1 comment · Fixed by #503
Closed

Allow custom rules to be provided with raw contents / via an fs.FS #492

jamietanna opened this issue Nov 25, 2023 · 1 comment · Fixed by #503

Comments

@jamietanna
Copy link
Contributor

When using the Go API for regal, it's possible to set custom rules by path.

However, this only works when the files are available on disk.

For instance, if you wanted to wrap regal as part of a separate binary, we'd want to package up the files in the binary with an embed.FS.

When an embed.FS is used, we'd need to unwrap the directory and copy it to the local file system to use.

It'd be convenient if we could either:

  • Provide a map of filename-to-contents
  • Provide an fs.FS (which satisfies embed.FS)

This would allow more flexibility for different use-cases.

@anderseknert
Copy link
Member

Agreed, that sounds like a good addition.

@anderseknert anderseknert moved this to TODO in Regal Nov 28, 2023
@anderseknert anderseknert moved this from TODO to Planned in Regal Nov 28, 2023
charlieegan3 added a commit that referenced this issue Nov 29, 2023
Related to #492

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit that referenced this issue Nov 29, 2023
Related to #492

Signed-off-by: Charlie Egan <charlie@styra.com>
anderseknert pushed a commit that referenced this issue Nov 29, 2023
Related to #492

Signed-off-by: Charlie Egan <charlie@styra.com>
@github-project-automation github-project-automation bot moved this from Planned to Done in Regal Nov 29, 2023
srenatus pushed a commit to srenatus/regal that referenced this issue Oct 1, 2024
Related to StyraInc#492

Signed-off-by: Charlie Egan <charlie@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants