MCPcopy Create free account
hub / github.com/GuyARoss/orbit / parsePath

Function parsePath

internal/srcpack/component.go:237–248  ·  view source on GitHub ↗

parsePath is a utility that verifies that the provided path is of a valid structure

(p string)

Source from the content-addressed store, hash-verified

235
236// parsePath is a utility that verifies that the provided path is of a valid structure
237func parsePath(p string) string {
238 skip := 0
239 for _, c := range p {
240 if c == '.' || c == '/' {
241 skip += 1
242 continue
243 }
244
245 break
246 }
247 return p[skip:]
248}
249
250type PackComponentFileMap map[string]PackComponent
251

Callers 3

TestParsePathFunction · 0.85
FindMethod · 0.85
SetMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestParsePathFunction · 0.68