SetPathTemplate sets the path template function for HTTP rate limiting.
(f func(*http.Request) (string, bool))
| 18 | |
| 19 | // SetPathTemplate sets the path template function for HTTP rate limiting. |
| 20 | func SetPathTemplate(f func(*http.Request) (string, bool)) func() { |
| 21 | old := pathTemplate |
| 22 | pathTemplate = f |
| 23 | return func() { pathTemplate = old } |
| 24 | } |