mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 23:10:55 +00:00
Update beego.go
This commit is contained in:
parent
6c62198b59
commit
67c0c232a1
4
beego.go
4
beego.go
@ -308,6 +308,10 @@ func SetStaticPath(url string, path string) *App {
|
|||||||
|
|
||||||
// DelStaticPath removes the static folder setting in this url pattern in beego application.
|
// DelStaticPath removes the static folder setting in this url pattern in beego application.
|
||||||
func DelStaticPath(url string) *App {
|
func DelStaticPath(url string) *App {
|
||||||
|
if !strings.HasPrefix(url, "/") {
|
||||||
|
url = "/" + url
|
||||||
|
}
|
||||||
|
url = strings.TrimRight(url, "/")
|
||||||
delete(StaticDir, url)
|
delete(StaticDir, url)
|
||||||
return BeeApp
|
return BeeApp
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user