MCPcopy Create free account
hub / github.com/Debian/dcs / File

Method File

internal/sourcebackend/sourcebackend.go:150–166  ·  view source on GitHub ↗

Serves a single file for displaying it in /show

(ctx context.Context, in *sourcebackendpb.FileRequest)

Source from the content-addressed store, hash-verified

148 newIndex.Close()
149 newBase.Close()
150 return err
151 }
152 hidden = make(map[string]bool)
153 for line := range strings.SplitSeq(string(b), "\n") {
154 pkg := strings.TrimSpace(line)
155 if pkg == "" {
156 continue
157 }
158 hidden[pkg] = true
159 }
160 }
161
162 s.mu.Lock()
163 oldIndex := s.index
164 oldBase := s.base
165 s.index = newIndex
166 s.base = newBase
167 s.hidden = hidden
168 s.mu.Unlock()
169

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected