静态文件 Static 让你用一行代码可以完成一个静态服务器。 http://localhost/images/logo.png --> ./public/images/logo.png当然,你也可以加入你basicauth或者你自己的认证中间件,这样就变为了一个私有的文件服务器。 然后在浏览器访问 http://localhost:8000/index.html。 tg.Get("/:name", tango.Dir("./public"))