aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/located.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-29 18:58:42 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-29 18:58:42 +0200
commit8fa0b258ac89781dae269790a4bde09cbcd2f324 (patch)
treeb9bcf0826f5739f128de52123447cede23291c02 /vendor/github.com/graphql-go/graphql/located.go
parent6363518c85cbd8247a5f6507b8a1dd3903cfb71d (diff)
downloadgit-bug-8fa0b258ac89781dae269790a4bde09cbcd2f324.tar.gz
cleaning
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/located.go')
-rw-r--r--vendor/github.com/graphql-go/graphql/located.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/vendor/github.com/graphql-go/graphql/located.go b/vendor/github.com/graphql-go/graphql/located.go
deleted file mode 100644
index 6ed8ec83..00000000
--- a/vendor/github.com/graphql-go/graphql/located.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package graphql
-
-import (
- "errors"
- "github.com/graphql-go/graphql/gqlerrors"
- "github.com/graphql-go/graphql/language/ast"
-)
-
-func NewLocatedError(err interface{}, nodes []ast.Node) *gqlerrors.Error {
- var origError error
- message := "An unknown error occurred."
- if err, ok := err.(error); ok {
- message = err.Error()
- origError = err
- }
- if err, ok := err.(string); ok {
- message = err
- origError = errors.New(err)
- }
- stack := message
- return gqlerrors.NewError(
- message,
- nodes,
- stack,
- nil,
- []int{},
- origError,
- )
-}
-
-func FieldASTsToNodeASTs(fieldASTs []*ast.Field) []ast.Node {
- nodes := []ast.Node{}
- for _, fieldAST := range fieldASTs {
- nodes = append(nodes, fieldAST)
- }
- return nodes
-}