We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
之前提的一个无法embed的问题,测试了下确实可以。但现在遇到一个embed的路径问题。 假设html的目录是static,目录下有index.html和main.js文件
//go:embed static var embAssets embed.FS r.StaticFS("/", http.FS(embAssets))
浏览器访问时需要输入:http://127.0.0.1:8080/static/index.html 但index.html中一般引入js的路径是http://127.0.0.1:8080/main.js 导致无法访问。所以希望在StaticFS中,能够把"static"这一层目录处理掉
The text was updated successfully, but these errors were encountered:
这个路径是 FS 控制的,大概翻了下,没找到怎么去掉一部分前缀路径
Sorry, something went wrong.
inhere
No branches or pull requests
之前提的一个无法embed的问题,测试了下确实可以。但现在遇到一个embed的路径问题。
假设html的目录是static,目录下有index.html和main.js文件
浏览器访问时需要输入:http://127.0.0.1:8080/static/index.html 但index.html中一般引入js的路径是http://127.0.0.1:8080/main.js 导致无法访问。所以希望在StaticFS中,能够把"static"这一层目录处理掉
The text was updated successfully, but these errors were encountered: