MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / readFiles

Function readFiles

internal/bundler/multipart.go:11–25  ·  view source on GitHub ↗
(dir string, paths []string)

Source from the content-addressed store, hash-verified

9)
10
11func readFiles(dir string, paths []string) ([]*pb.File, error) {
12 files, err := sqlpath.Glob(paths)
13 if err != nil {
14 return nil, err
15 }
16 var out []*pb.File
17 for _, file := range files {
18 f, err := readFile(dir, file)
19 if err != nil {
20 return nil, err
21 }
22 out = append(out, f)
23 }
24 return out, nil
25}
26
27func readFile(dir string, path string) (*pb.File, error) {
28 rel, err := filepath.Rel(dir, path)

Callers 1

BuildRequestFunction · 0.85

Calls 2

GlobFunction · 0.92
readFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…