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

Migrate to go 1.16 embed #7

Closed
wants to merge 1 commit into from
Closed

Conversation

xakep666
Copy link

@xakep666 xakep666 commented Feb 27, 2021

Will close #5

This solution contains only two lines of go code (variable declarations). But copying dist from submodule is necessary because submodule will not be downloaded during go get or go mod download. It leads to compilation error for module users.

After merge of this PR dependend projects (http-swagger, echo-swagger, gin-swagger) may be easily refactored using http.StripPrefix(prefix, http.FileServer(http.FS(swaggerFiles.UI)))

@ubogdan
Copy link
Contributor

ubogdan commented Aug 11, 2021

We are aware of go 1.16 embed feature. Unfortunately, we can't go with this approach because the library won't be "backward compatible" for users building with older versions.

@ubogdan ubogdan closed this Aug 11, 2021
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.

Consider using the standard library "embed"
2 participants