Skip to content

Commit 673840e

Browse files
Picking some nits that my IDE complained about (#91)
* Picking some nits that my IDE complained about Signed-off-by: Steve Coffman <[email protected]> * Update graphql/util.go Co-authored-by: Ben Kraft <[email protected]> * revert to original for comment Signed-off-by: Steve Coffman <[email protected]> Co-authored-by: Ben Kraft <[email protected]>
1 parent 639b46d commit 673840e

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ csilvers is Craig Silverstein
1313

1414
## Running genqlient
1515

16-
It's already checked in to github, but to regenerate `generated.go`:
16+
It's already checked in to GitHub, but to regenerate `generated.go`:
1717
```sh
1818
go generate ./...
1919
```

example/cmd/example/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package main
22

33
import (
4-
example "github.com/Khan/genqlient/example"
4+
"github.com/Khan/genqlient/example"
55
)
66

77
func main() {

generate/convert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (g *generator) convertInputType(
9090
options, queryOptions *genqlientDirective,
9191
) (goType, error) {
9292
// note prefix is ignored here (see generator.typeName), as is selectionSet
93-
// (for input types we use the whole thing)).
93+
// (for input types we use the whole thing).
9494
return g.convertType(nil, typ, nil, options, queryOptions)
9595
}
9696

@@ -463,7 +463,7 @@ func (g *generator) convertInlineFragment(
463463
containingTypedef *ast.Definition,
464464
queryOptions *genqlientDirective,
465465
) ([]*goStructField, error) {
466-
// You might think fragmentTypedef would be fragment.ObjectDefinition, but
466+
// You might think fragmentTypedef would be a fragment.ObjectDefinition, but
467467
// actually that's the type into which the fragment is spread.
468468
fragmentTypedef := g.schema.Types[fragment.TypeCondition]
469469
if !fragmentMatches(containingTypedef, fragmentTypedef) {

generate/description.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type descriptionInfo struct {
1818
CommentOverride string
1919
// name of the corresponding GraphQL type
2020
GraphQLName string
21-
// GraphQL description of the type .GraphQLName, if any
21+
// GraphQL schema's description of the type .GraphQLName, if any
2222
GraphQLDescription string
2323
// name of the corresponding GraphQL fragment (on .GraphQLName), if any
2424
FragmentName string

generate/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (typ *goInterfaceType) WriteDefinition(w io.Writer, g *generator) error {
245245
"Get%s is a part of, and documented with, the interface %s.",
246246
sharedField.GoName, typ.GoName)
247247
writeDescription(w, description)
248-
// In principle we should find the corresponding field of the
248+
// In principle, we should find the corresponding field of the
249249
// implementation and use its name in `v.<name>`. In practice,
250250
// they're always the same.
251251
fmt.Fprintf(w, "func (v *%s) Get%s() %s { return v.%s }\n",

graphql/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/vektah/gqlparser/v2/gqlerror"
1212
)
1313

14-
// Client is the interface that the generate code calls into to actually make
14+
// Client is the interface that the generated code calls into to actually make
1515
// requests.
1616
//
1717
// Unstable: This interface is likely to change before v1.0, see #19.

graphql/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package graphql
66
// NoUnmarshalJSON is intended for the use of genqlient's generated code only.
77
//
88
// It is used to prevent a struct type from inheriting its embed's
9-
// UnmarshalJSON method: given a type
9+
// UnmarshalJSON method, so if we construct a type:
1010
// type T struct { E; NoUnmarshalJSON }
1111
// where E has an UnmarshalJSON method, T will not inherit it, per the Go
1212
// selector rules: https://golang.org/ref/spec#Selectors.

internal/integration/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func TestInterfaceListPointerField(t *testing.T) {
223223
assert.Equal(t, "Yours Truly", (*resp.Beings[0]).GetName())
224224

225225
user, ok := (*resp.Beings[0]).(*queryWithInterfaceListPointerFieldBeingsUser)
226-
require.Truef(t, ok, "got %T, not User", (*resp.Beings[0]))
226+
require.Truef(t, ok, "got %T, not User", *resp.Beings[0])
227227
assert.Equal(t, "1", user.Id)
228228
assert.Equal(t, "Yours Truly", user.Name)
229229

0 commit comments

Comments
 (0)