Skip to content

Commit

Permalink
[TT-5279] Use strings to create byte slice vars
Browse files Browse the repository at this point in the history
[changelog]
internal: Changed explicit byte slice creation to string conversion.
  • Loading branch information
David Stutt committed May 25, 2022
1 parent d4210ec commit 55244b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/ast/ast_root_operation_type_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"github.com/jensneuse/graphql-go-tools/pkg/lexer/position"
)

var DefaultQueryTypeName = []byte{'Q', 'u', 'e', 'r', 'y'}
var DefaultMutationTypeName = []byte{'M', 'u', 't', 'a', 't', 'i', 'o', 'n'}
var DefaultSubscriptionTypeName = []byte{'S', 'u', 'b', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n'}
var DefaultQueryTypeName = []byte("Query")
var DefaultMutationTypeName = []byte("Mutation")
var DefaultSubscriptionTypeName = []byte("Subscription")

type RootOperationTypeDefinitionList struct {
LBrace position.Position // {
Expand Down
2 changes: 1 addition & 1 deletion pkg/astvalidation/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/jensneuse/graphql-go-tools/pkg/astvisitor"
)

var reservedFieldPrefix = []byte{'_', '_'}
var reservedFieldPrefix = []byte("__")

// Rule is hook to register callback functions on the Walker
type Rule func(walker *astvisitor.Walker)

0 comments on commit 55244b8

Please sign in to comment.