Fix a lint warning by simplifying this append operation.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
c0f13ef4ac
commit
ae9bdc1d61
@ -156,7 +156,7 @@ func startLocalCallbackServer(t *testing.T) *localCallbackServer {
|
|||||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
callbacks <- r
|
callbacks <- r
|
||||||
}))
|
}))
|
||||||
server.URL = server.URL + "/callback"
|
server.URL += "/callback"
|
||||||
t.Cleanup(server.Close)
|
t.Cleanup(server.Close)
|
||||||
t.Cleanup(func() { close(callbacks) })
|
t.Cleanup(func() { close(callbacks) })
|
||||||
return &localCallbackServer{Server: server, t: t, callbacks: callbacks}
|
return &localCallbackServer{Server: server, t: t, callbacks: callbacks}
|
||||||
|
Loading…
Reference in New Issue
Block a user