diff options
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/language/ast/name.go')
-rw-r--r-- | vendor/github.com/graphql-go/graphql/language/ast/name.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/github.com/graphql-go/graphql/language/ast/name.go b/vendor/github.com/graphql-go/graphql/language/ast/name.go new file mode 100644 index 00000000..00fddbcd --- /dev/null +++ b/vendor/github.com/graphql-go/graphql/language/ast/name.go @@ -0,0 +1,31 @@ +package ast + +import ( + "github.com/graphql-go/graphql/language/kinds" +) + +// Name implements Node +type Name struct { + Kind string + Loc *Location + Value string +} + +func NewName(node *Name) *Name { + if node == nil { + node = &Name{} + } + return &Name{ + Kind: kinds.Name, + Value: node.Value, + Loc: node.Loc, + } +} + +func (node *Name) GetKind() string { + return node.Kind +} + +func (node *Name) GetLoc() *Location { + return node.Loc +} |