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

配置静态文件路由 #111

Open
GuiCheng-Li opened this issue Jul 10, 2024 · 0 comments
Open

配置静态文件路由 #111

GuiCheng-Li opened this issue Jul 10, 2024 · 0 comments

Comments

@GuiCheng-Li
Copy link

GuiCheng-Li commented Jul 10, 2024

我想在r.mux上加一个下面这个方法
r := gin.Default()
// 配置静态文件路由
r.Static("/static", "./static")
Static方法 我应该在pkg/core.go下怎么加这个方法呢 我尝试了很多办法 最后都倒在了Cannot use 'm.engine.Static(relativePath, root)' (type "github.com/gin-gonic/gin".IRoutes) as the type "github.com/xinliangnote/go-gin-api/internal/pkg/core".IRoutes Type does not implement 'IRoutes' as some methods are missing: Any(string, ...HandlerFunc) 这个问题上

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