mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 10:31:59 +00:00
tsweb: add StdHandlerOpts that accepts an options struct
I'm about to add yet another StdHandler option. Time to refactor. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
committed by
Josh Bleecher Snyder
parent
eab6e9ea4e
commit
e98f2c57d6
@@ -248,7 +248,7 @@ func TestStdHandler(t *testing.T) {
|
||||
clock.Reset()
|
||||
|
||||
rec := noopHijacker{httptest.NewRecorder(), false}
|
||||
h := stdHandler(test.rh, logf, clock.Now, true)
|
||||
h := StdHandlerOpts(test.rh, HandlerOptions{Logf: logf, Now: clock.Now})
|
||||
h.ServeHTTP(&rec, test.r)
|
||||
res := rec.Result()
|
||||
if res.StatusCode != test.wantCode {
|
||||
|
||||
Reference in New Issue
Block a user