genql: bits of whitespace

This commit is contained in:
Ben Kraft
2020-01-02 18:00:23 -08:00
parent 9746c818fd
commit 7dfd03738c
2 changed files with 2 additions and 5 deletions
-3
View File
@@ -14,7 +14,6 @@ type getViewerResponse = struct {
// TODO
func getViewer(ctx context.Context, client *graphql.Client) (*getViewerResponse, error) {
var retval getViewerResponse
err := client.MakeRequest(ctx, `
query getViewer {
@@ -34,9 +33,7 @@ type getUserResponse = struct {
// TODO
func getUser(ctx context.Context, client *graphql.Client, login string) (*getUserResponse, error) {
variables := map[string]interface{}{
"login": login,
}
+2 -2
View File
@@ -11,9 +11,9 @@ type {{.ResponseName}} = {{.ResponseType}}
// {{.Doc}}
func {{.Name}}(ctx context.Context, client *graphql.Client{{range .Args}}, {{.GoName}} {{.GoType}}{{end}}) (*{{.ResponseName}}, error) {
{{if .Args}}
{{- if .Args -}}
variables := map[string]interface{}{
{{range .Args}}
{{range .Args -}}
"{{.GraphQLName}}": {{.GoName}},
{{end}}
}