MCPcopy Create free account
hub / github.com/cozystack/cozystack / escapeJSONPointer

Function escapeJSONPointer

internal/fluxshardoperator/webhook.go:107–109  ·  view source on GitHub ↗

escapeJSONPointer escapes a JSON pointer path segment (RFC 6901).

(s string)

Source from the content-addressed store, hash-verified

105
106// escapeJSONPointer escapes a JSON pointer path segment (RFC 6901).
107func escapeJSONPointer(s string) string {
108 return strings.NewReplacer("~", "~0", "/", "~1").Replace(s)
109}

Callers 1

HandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected