diff options
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/language/source/source.go')
-rw-r--r-- | vendor/github.com/graphql-go/graphql/language/source/source.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/graphql-go/graphql/language/source/source.go b/vendor/github.com/graphql-go/graphql/language/source/source.go new file mode 100644 index 00000000..f14af003 --- /dev/null +++ b/vendor/github.com/graphql-go/graphql/language/source/source.go @@ -0,0 +1,20 @@ +package source + +const ( + name = "GraphQL" +) + +type Source struct { + Body []byte + Name string +} + +func NewSource(s *Source) *Source { + if s == nil { + s = &Source{Name: name} + } + if s.Name == "" { + s.Name = name + } + return s +} |