genql: bits of whitespace
This commit is contained in:
@@ -14,7 +14,6 @@ type getViewerResponse = struct {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
func getViewer(ctx context.Context, client *graphql.Client) (*getViewerResponse, error) {
|
func getViewer(ctx context.Context, client *graphql.Client) (*getViewerResponse, error) {
|
||||||
|
|
||||||
var retval getViewerResponse
|
var retval getViewerResponse
|
||||||
err := client.MakeRequest(ctx, `
|
err := client.MakeRequest(ctx, `
|
||||||
query getViewer {
|
query getViewer {
|
||||||
@@ -34,9 +33,7 @@ type getUserResponse = struct {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
func getUser(ctx context.Context, client *graphql.Client, login string) (*getUserResponse, error) {
|
func getUser(ctx context.Context, client *graphql.Client, login string) (*getUserResponse, error) {
|
||||||
|
|
||||||
variables := map[string]interface{}{
|
variables := map[string]interface{}{
|
||||||
|
|
||||||
"login": login,
|
"login": login,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ type {{.ResponseName}} = {{.ResponseType}}
|
|||||||
|
|
||||||
// {{.Doc}}
|
// {{.Doc}}
|
||||||
func {{.Name}}(ctx context.Context, client *graphql.Client{{range .Args}}, {{.GoName}} {{.GoType}}{{end}}) (*{{.ResponseName}}, error) {
|
func {{.Name}}(ctx context.Context, client *graphql.Client{{range .Args}}, {{.GoName}} {{.GoType}}{{end}}) (*{{.ResponseName}}, error) {
|
||||||
{{if .Args}}
|
{{- if .Args -}}
|
||||||
variables := map[string]interface{}{
|
variables := map[string]interface{}{
|
||||||
{{range .Args}}
|
{{range .Args -}}
|
||||||
"{{.GraphQLName}}": {{.GoName}},
|
"{{.GraphQLName}}": {{.GoName}},
|
||||||
{{end}}
|
{{end}}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user