mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-26 02:29:28 +00:00
tsweb: rename Handler to ReturnHandler
The name's been bugging me for a long time. I liked neither the overlap between tsweb.Handler and http.Handler, nor the name "ServeHTTPErr" which sounds like it's an error being returned, like it's an error handler and not sometimes a happy path. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
bdc55d7091
commit
64334143a1
@@ -95,7 +95,7 @@ func promPrint(w io.Writer, prefix string, obj map[string]interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
func (h *goVarsHandler) ServeHTTPErr(w http.ResponseWriter, r *http.Request) error {
|
||||
func (h *goVarsHandler) ServeHTTPReturn(w http.ResponseWriter, r *http.Request) error {
|
||||
resp, err := http.Get(h.url)
|
||||
if err != nil {
|
||||
return tsweb.Error(http.StatusInternalServerError, "fetch failed", err)
|
||||
|
||||
Reference in New Issue
Block a user