mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-01 12:11:19 +02:00
Lint for non-comment linter errors
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ func Request(req *http.Request) (*simplejson.Json, error) {
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func RequestJson(req *http.Request, v interface{}) error {
|
||||
func RequestJSON(req *http.Request, v interface{}) error {
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
log.Printf("%s %s %s", req.Method, req.URL, err)
|
||||
|
||||
+4
-3
@@ -1,20 +1,21 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/bitly/go-simplejson"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/bitly/go-simplejson"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func testBackend(response_code int, payload string) *httptest.Server {
|
||||
func testBackend(responseCode int, payload string) *httptest.Server {
|
||||
return httptest.NewServer(http.HandlerFunc(
|
||||
func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(response_code)
|
||||
w.WriteHeader(responseCode)
|
||||
w.Write([]byte(payload))
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user