MCPcopy
hub / github.com/cli/cli / escapePath

Function escapePath

pkg/cmd/browse/browse.go:298–300  ·  view source on GitHub ↗

escapePath URL-encodes special characters but leaves slashes unchanged

(p string)

Source from the content-addressed store, hash-verified

296
297// escapePath URL-encodes special characters but leaves slashes unchanged
298func escapePath(p string) string {
299 return strings.ReplaceAll(url.PathEscape(p), "%2F", "/")
300}
301
302func parseFile(opts BrowseOptions, f string) (p string, start int, end int, err error) {
303 if f == "" {

Callers 1

parseSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected