Middleware in gorilla/mux?

1,021 views
Skip to first unread message

Jamison Dance

unread,
Mar 22, 2013, 5:52:10 PM3/22/13
to goril...@googlegroups.com
Hey friends. I am getting into Go and stumbled upon gorilla as a light-weight http helper library.

Is there any support for route or router-specific middleware similar to Rack in Ruby or Express in node? It is helpful for configuring global headers and error-handling things. Alternatively, is there a better way to set a specific HTTP header for all routes?

Fred Wang

unread,
Mar 22, 2013, 7:59:43 PM3/22/13
to goril...@googlegroups.com
https://github.com/studygolang/mux

This fork support request filter.


On Saturday, March 23, 2013, Jamison Dance wrote:
Hey friends. I am getting into Go and stumbled upon gorilla as a light-weight http helper library.

Is there any support for route or router-specific middleware similar to Rack in Ruby or Express in node? It is helpful for configuring global headers and error-handling things. Alternatively, is there a better way to set a specific HTTP header for all routes?

--
You received this message because you are subscribed to the Google Groups "Gorilla web toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gorilla-web...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Sent from Gmail Mobile

Jemes Hsu

unread,
Mar 26, 2013, 3:01:21 PM3/26/13
to goril...@googlegroups.com
There are two new files in your fork: chain.go and filter.go. Is there any example on how to use the filters? Thanks


On Saturday, March 23, 2013 7:59:43 AM UTC+8, Fred Wang wrote:
https://github.com/studygolang/mux

This fork support request filter.


On Saturday, March 23, 2013, Jamison Dance wrote:
Hey friends. I am getting into Go and stumbled upon gorilla as a light-weight http helper library.

Is there any support for route or router-specific middleware similar to Rack in Ruby or Express in node? It is helpful for configuring global headers and error-handling things. Alternatively, is there a better way to set a specific HTTP header for all routes?

--
You received this message because you are subscribed to the Google Groups "Gorilla web toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gorilla-web+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Fred Wang

unread,
Mar 26, 2013, 10:06:16 PM3/26/13
to goril...@googlegroups.com
It's not my fork.
I'm only a user.






To unsubscribe from this group and stop receiving emails from it, send an email to gorilla-web...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Fred Wang(Sempr) @ HUST STI

Jemes Hsu

unread,
Mar 26, 2013, 11:10:19 PM3/26/13
to goril...@googlegroups.com, i...@1e20.com
Thanks for the pointer!
Reply all
Reply to author
Forward
0 new messages