MCPcopy Index your code
hub / github.com/coder/coder / extractSegments

Function extractSegments

agent/filefinder/text.go:100–112  ·  view source on GitHub ↗
(path []byte)

Source from the content-addressed store, hash-verified

98}
99
100func extractSegments(path []byte) [][]byte {
101 var segments [][]byte
102 start := 0
103 for i := 0; i <= len(path); i++ {
104 if i == len(path) || path[i] == '/' {
105 if i > start {
106 segments = append(segments, path[start:i])
107 }
108 start = i + 1
109 }
110 }
111 return segments
112}
113
114func prefix1(name []byte) byte {
115 if len(name) == 0 {

Callers 2

mergeAndScoreFunction · 0.85
scorePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected