MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / pythonStringRepr

Function pythonStringRepr

agentContext/tokens.go:83–92  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

81}
82
83func pythonStringRepr(value string) string {
84 replacer := strings.NewReplacer(
85 "\\", "\\\\",
86 "'", "\\'",
87 "\n", "\\n",
88 "\r", "\\r",
89 "\t", "\\t",
90 )
91 return "'" + replacer.Replace(value) + "'"
92}
93
94func fmtAny(value any) string {
95 data, err := json.Marshal(value)

Callers 1

pythonReprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected