ci: add reviewdog (#1096)
This commit is contained in:
@@ -16,7 +16,8 @@ func TestAuthHandlerFailed(t *testing.T) {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", nil)
|
||||
handler := Authorize("B63F477D-BBA3-4E52-96D3-C0034C27694A", WithUnauthorizedCallback(
|
||||
func(w http.ResponseWriter, r *http.Request, err error) {
|
||||
w.Header().Set("X-Test", "test")
|
||||
assert.NotNil(t, err)
|
||||
w.Header().Set("X-Test", err.Error())
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
_, err = w.Write([]byte("content"))
|
||||
assert.Nil(t, err)
|
||||
|
||||
@@ -275,8 +275,7 @@ func TestContentSecurityHandler_UnsignedCallback_WrongTime(t *testing.T) {
|
||||
})
|
||||
handler := contentSecurityHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
|
||||
|
||||
var reader io.Reader
|
||||
reader = strings.NewReader("hello")
|
||||
reader := strings.NewReader("hello")
|
||||
setting := requestSettings{
|
||||
method: http.MethodPost,
|
||||
url: "http://localhost/a/b?c=d&e=f",
|
||||
|
||||
Reference in New Issue
Block a user