Skip to content

Commit 21daceb

Browse files
committed
properly format code with go fmt
* run `go fmt .` once in the repository.
1 parent fab5288 commit 21daceb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

handler.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const (
2020

2121
type Handler struct {
2222
Schema *graphql.Schema
23-
23+
2424
pretty bool
2525
}
2626
type RequestOptions struct {
@@ -129,7 +129,6 @@ func (h *Handler) ContextHandler(ctx context.Context, w http.ResponseWriter, r *
129129
}
130130
result := graphql.Do(params)
131131

132-
133132
if h.pretty {
134133
w.WriteHeader(http.StatusOK)
135134
buff, _ := json.MarshalIndent(result, "", "\t")
@@ -138,7 +137,7 @@ func (h *Handler) ContextHandler(ctx context.Context, w http.ResponseWriter, r *
138137
} else {
139138
w.WriteHeader(http.StatusOK)
140139
buff, _ := json.Marshal(result)
141-
140+
142141
w.Write(buff)
143142
}
144143
}

handler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"strings"
1111
"testing"
1212

13+
"context"
1314
"github.com/graphql-go/graphql"
1415
"github.com/graphql-go/graphql/testutil"
1516
"github.com/graphql-go/handler"
16-
"context"
1717
)
1818

1919
func decodeResponse(t *testing.T, recorder *httptest.ResponseRecorder) *graphql.Result {

0 commit comments

Comments
 (0)