MCPcopy Create free account
hub / github.com/nsf/gocode / new_file_reader

Function new_file_reader

utils.go:223–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func new_file_reader() *file_reader_type {
224 this := new(file_reader_type)
225 this.in = make(chan file_read_request)
226 go func() {
227 var rsp file_read_response
228 for {
229 req := <-this.in
230 rsp.data, rsp.error = ioutil.ReadFile(req.filename)
231 req.out <- rsp
232 }
233 }()
234 return this
235}
236
237func (this *file_reader_type) read_file(filename string) ([]byte, error) {
238 req := file_read_request{

Callers 1

utils.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected