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:embed for serving static UI files #21652

Open
williamhbaker opened this issue Jun 10, 2021 · 1 comment
Open

Use go:embed for serving static UI files #21652

williamhbaker opened this issue Jun 10, 2021 · 1 comment
Labels
area/ui area/2.x OSS 2.0 related issues and PRs team/edge

Comments

@williamhbaker
Copy link
Contributor

Now that we are using go1.16, we can refactor the static asset server to use go:embed rather than go-bindata.

@williamhbaker
Copy link
Contributor Author

While working on #21785, I found that since go:embed doesn't do any kind of asset compression, using it as-is to embed the UI resulted in a very large increase in the compiled binary size.

To use go:embed for embedding the UI files, we would need to compress the UI files prior to embedding them, and handle serving the compressed files appropriately. As noted in #21785, something like https://github.com/vearutop/statigz might provide the solution.

@danxmoran danxmoran changed the title Use go:embed for serving status UI files Use go:embed for serving static UI files Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui area/2.x OSS 2.0 related issues and PRs team/edge
Projects
None yet
Development

No branches or pull requests

1 participant