MCPcopy Create free account
hub / github.com/github/gh-aw / escapeGraphQLString

Function escapeGraphQLString

pkg/cli/project_command.go:398–405  ·  view source on GitHub ↗

escapeGraphQLString escapes special characters in GraphQL strings

(s string)

Source from the content-addressed store, hash-verified

396
397// escapeGraphQLString escapes special characters in GraphQL strings
398func escapeGraphQLString(s string) string {
399 s = strings.ReplaceAll(s, "\\", "\\\\")
400 s = strings.ReplaceAll(s, "\"", "\\\"")
401 s = strings.ReplaceAll(s, "\n", "\\n")
402 s = strings.ReplaceAll(s, "\r", "\\r")
403 s = strings.ReplaceAll(s, "\t", "\\t")
404 return s
405}
406
407// projectURLInfo contains parsed project URL information
408type projectURLInfo struct {

Callers 5

validateOwnerFunction · 0.85
getOwnerNodeIdFunction · 0.85
getStatusFieldFunction · 0.85
TestEscapeGraphQLStringFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestEscapeGraphQLStringFunction · 0.68