You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.When visit the static page ,such as http://localhost:8080/static/index.html,It still execute the Controller's All Initially() and Before() function? if visit the static page ,it will execute these function many time,because the index.htm include some css and js and jpg?
Maybe another usage is that we can intercept the static file. Maybe should make a switch for it?
the route for static is: r.Get("/static/*filepath", http.StripPrefix("/static/", http.FileServer(http.Dir("./static")), ).ServeHTTP),
2.There are still not RenderXML and RenderFile methods.
3.Have a flash function like revel's flash function? and the compressionTypes,cache.....?
4.https? http2?
The text was updated successfully, but these errors were encountered:
No. http.StripPrefix("/static/", http.FileServer(http.Dir("./static")) is not an action but a set of functions from standard library. That's why neither Initially nor Before will be started when serving a static page or some other static assets.
I have added xml. Now need to create a files controller with the analogues of Revel's RenderFile and RenderBinary.
Plus, a controller with Redirect, RenderNotFound, RenderError, RenderToDo, RenderForbidden would be helpful.
At some point I'll implement all of this. BTW, PRs to colegion/contrib repo are welcome.
There is no flash controller. I'll implement it today or tomorrow.
Neither compression nor cache controllers have been added yet, too.
1.When visit the static page ,such as
http://localhost:8080/static/index.html
,It still execute theController
's AllInitially()
andBefore()
function? if visit the static page ,it will execute these function many time,because the index.htm include some css and js and jpg?Maybe another usage is that we can intercept the static file. Maybe should make a switch for it?
the route for static is:
r.Get("/static/*filepath", http.StripPrefix("/static/", http.FileServer(http.Dir("./static")), ).ServeHTTP),
2.There are still not
RenderXML
andRenderFile
methods.3.Have a flash function like
revel
'sflash
function? and thecompressionTypes
,cache
.....?4.https? http2?
The text was updated successfully, but these errors were encountered: