Skip to content

Commit d7447c6

Browse files
authored
refactor: rename local variables to match Go codestyle (#3100)
1 parent 834d832 commit d7447c6

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

‎api/generate.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ func Generate(cfg *config.Config, option ...Option) error {
9090
}
9191
}
9292
// Merge again now that the generated models have been injected into the typemap
93-
data_plugins := make([]any, len(plugins))
93+
dataPlugins := make([]any, len(plugins))
9494
for index := range plugins {
95-
data_plugins[index] = plugins[index]
95+
dataPlugins[index] = plugins[index]
9696
}
97-
data, err := codegen.BuildData(cfg, data_plugins...)
97+
data, err := codegen.BuildData(cfg, dataPlugins...)
9898
if err != nil {
9999
return fmt.Errorf("merging type systems failed: %w", err)
100100
}

‎graphql/handler/transport/http_form_urlencoded.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ func (h UrlEncodedForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.
6363
return
6464
}
6565

66-
rc, OpErr := exec.CreateOperationContext(ctx, params)
67-
if OpErr != nil {
68-
w.WriteHeader(statusFor(OpErr))
69-
resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), OpErr)
66+
rc, opErr := exec.CreateOperationContext(ctx, params)
67+
if opErr != nil {
68+
w.WriteHeader(statusFor(opErr))
69+
resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), opErr)
7070
writeJson(w, resp)
7171
return
7272
}

‎graphql/handler/transport/http_graphql.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ func (h GRAPHQL) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphEx
6464
return
6565
}
6666

67-
rc, OpErr := exec.CreateOperationContext(ctx, params)
68-
if OpErr != nil {
69-
w.WriteHeader(statusFor(OpErr))
70-
resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), OpErr)
67+
rc, opErr := exec.CreateOperationContext(ctx, params)
68+
if opErr != nil {
69+
w.WriteHeader(statusFor(opErr))
70+
resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), opErr)
7171
writeJson(w, resp)
7272
return
7373
}

‎graphql/handler/transport/http_post.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ func (h POST) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecu
7878
return
7979
}
8080

81-
rc, OpErr := exec.CreateOperationContext(ctx, params)
82-
if OpErr != nil {
83-
w.WriteHeader(statusFor(OpErr))
84-
resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), OpErr)
81+
rc, opErr := exec.CreateOperationContext(ctx, params)
82+
if opErr != nil {
83+
w.WriteHeader(statusFor(opErr))
84+
resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), opErr)
8585
writeJson(w, resp)
8686
return
8787
}

0 commit comments

Comments
 (0)