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

Use Go 1.16 Embed for the HTML files #21

Open
arschles opened this issue Sep 7, 2021 · 0 comments
Open

Use Go 1.16 Embed for the HTML files #21

arschles opened this issue Sep 7, 2021 · 0 comments

Comments

@arschles
Copy link

arschles commented Sep 7, 2021

Using embed would remove the requirement for packr in the development workflow. Using this method, you also get assets built into an embed.FS, which is an implementation of the new fs.FS, which in turn has interoperability with lots of the standard library and a growing number of other libraries.

The drawback of this approach would be that Go 1.16+ would be required. Having used both Packr and the built-in tooling, I believe that embed is a better choice in this situation. Note that if 1.11+ is a hard requirement, it would be possible to support versions [1.11, 1.16) with build tags, while still supporting embed for 1.16 and beyond.

Edit: I am happy to contribute a PR for this.

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

1 participant