e1475b72 by astaxie

Merge pull request #826 from SnailKnows/patch-2

Update beego.go
2 parents f267ee8a 67c0c232
Showing 1 changed file with 4 additions and 0 deletions
...@@ -308,6 +308,10 @@ func SetStaticPath(url string, path string) *App { ...@@ -308,6 +308,10 @@ func SetStaticPath(url string, path string) *App {
308 308
309 // DelStaticPath removes the static folder setting in this url pattern in beego application. 309 // DelStaticPath removes the static folder setting in this url pattern in beego application.
310 func DelStaticPath(url string) *App { 310 func DelStaticPath(url string) *App {
311 if !strings.HasPrefix(url, "/") {
312 url = "/" + url
313 }
314 url = strings.TrimRight(url, "/")
311 delete(StaticDir, url) 315 delete(StaticDir, url)
312 return BeeApp 316 return BeeApp
313 } 317 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!