MCPcopy Index your code
hub / github.com/cortesi/devd / stripPrefix

Function stripPrefix

fileserver/fileserver.go:76–84  ·  view source on GitHub ↗
(prefix string, path string)

Source from the content-addressed store, hash-verified

74}
75
76func stripPrefix(prefix string, path string) string {
77 if prefix == "" {
78 return path
79 }
80 if p := strings.TrimPrefix(path, prefix); len(p) < len(path) {
81 return p
82 }
83 return path
84}
85
86// errSeeker is returned by ServeContent's sizeFunc when the content
87// doesn't seek properly. The underlying Seeker's error text isn't

Callers 1

ServeHTTPContextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected