-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WrapIfUnwrapped and other Lint fixes (#275)
* Add WrapIfUnwrapped Signed-off-by: Steve Coffman <steve@khanacademy.org> * Lint fixes Signed-off-by: Steve Coffman <steve@khanacademy.org> --------- Signed-off-by: Steve Coffman <steve@khanacademy.org>
- Loading branch information
1 parent
2159f67
commit 450a0ee
Showing
9 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,9 @@ type PathElement interface { | |
var _ PathElement = PathIndex(0) | ||
var _ PathElement = PathName("") | ||
|
||
func (path Path) String() string { | ||
func (path *Path) String() string { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
StevenACoffman
Author
Collaborator
|
||
var str bytes.Buffer | ||
for i, v := range path { | ||
for i, v := range *path { | ||
switch v := v.(type) { | ||
case PathIndex: | ||
str.WriteString(fmt.Sprintf("[%d]", v)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
module github.com/vektah/gqlparser/v2 | ||
|
||
go 1.16 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/agnivade/levenshtein v1.1.1 | ||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 | ||
github.com/sergi/go-diff v1.3.1 // indirect | ||
github.com/stretchr/testify v1.4.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/sergi/go-diff v1.3.1 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is actually breaking~