From 094d27d795f417ec447ae72a4af5dcf13fcbe5b2 Mon Sep 17 00:00:00 2001 From: David Bloss Date: Thu, 12 Oct 2023 10:28:48 -0500 Subject: [PATCH] remove unused const --- clientGQL_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/clientGQL_test.go b/clientGQL_test.go index 99194ec8..df96098c 100644 --- a/clientGQL_test.go +++ b/clientGQL_test.go @@ -20,11 +20,6 @@ import ( "github.com/rs/zerolog/log" ) -const ( - queryPrefix string = `"query":` - varPrefix string = `"variables":` -) - func TestMain(m *testing.M) { output := zerolog.ConsoleWriter{Out: os.Stderr} log.Logger = log.Output(output) @@ -167,7 +162,6 @@ func (t *TestRequest) IsValidJson(data string) bool { func (t *TestRequest) ParseRequest(rawRequest string) { parsedRequest, _ := t.templater.ParseTemplatedString(rawRequest) - // queryValue, _ := strings.CutPrefix(rawRequest, queryPrefix) jsonFormattedRequest := fmt.Sprintf("{%s}", parsedRequest) if !t.IsValidJson(jsonFormattedRequest) { panic(fmt.Errorf("test request could not be JSON formatted: %s", parsedRequest)) @@ -185,6 +179,7 @@ func (t *TestRequest) ParseVariables(rawVariables string) { panic(err) } + varPrefix := `"variables":` jsonFormattedVariableObject := strings.TrimSpace(parsedVariables) jsonFormattedVariableObject, _ = strings.CutPrefix(jsonFormattedVariableObject, varPrefix) if !t.IsValidJson(jsonFormattedVariableObject) {