Skip to content

配置静态文件路由 #111

Description

@GuiCheng-Li

我想在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) 这个问题上

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions