Last active
November 19, 2020 03:34
-
-
Save antklim/425e34027477dc33cf3633b610a8179b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type HTTPClient interface { | |
| Do(req *http.Request) (*http.Response, error) | |
| } | |
| func Routes(client HTTPClient) map[string]http.HandlerFunc { | |
| return map[string]http.HandlerFunc{ | |
| "/do": doHandler(), | |
| "/remote": remoteHandler(client), | |
| "/": notFoundHandler, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment