1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-01 07:03:26 +00:00

Update beego.go

This commit is contained in:
SnailKnows 2014-09-20 18:56:46 +08:00
parent 6c62198b59
commit 67c0c232a1

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
}