Use wraps the servers with the given middleware.
(m func(http.Handler) http.Handler)
| 23 | |
| 24 | // Use wraps the servers with the given middleware. |
| 25 | func (s Servers) Use(m func(http.Handler) http.Handler) { |
| 26 | for _, v := range s { |
| 27 | v.Use(m) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | // Mount will go through all the servers and mount them into the Muxer. It will |
| 32 | // panic unless all servers satisfy the Mounter interface. |