escapeGraphQLString escapes special characters in GraphQL strings
(s string)
| 396 | |
| 397 | // escapeGraphQLString escapes special characters in GraphQL strings |
| 398 | func 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 |
| 408 | type projectURLInfo struct { |
no outgoing calls