1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 18:50:50 +00:00

Merge pull request #826 from SnailKnows/patch-2

Update beego.go
This commit is contained in:
astaxie 2014-09-23 00:31:21 +08:00
commit e1475b72b9

View File

@ -308,6 +308,10 @@ func SetStaticPath(url string, path string) *App {
// DelStaticPath removes the static folder setting in this url pattern in beego application.
func DelStaticPath(url string) *App {
if !strings.HasPrefix(url, "/") {
url = "/" + url
}
url = strings.TrimRight(url, "/")
delete(StaticDir, url)
return BeeApp
}