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

Function readFile

internal/bundler/multipart.go:27–40  ·  view source on GitHub ↗
(dir string, path string)

Source from the content-addressed store, hash-verified

25}
26
27func readFile(dir string, path string) (*pb.File, error) {
28 rel, err := filepath.Rel(dir, path)
29 if err != nil {
30 return nil, err
31 }
32 blob, err := os.ReadFile(path)
33 if err != nil {
34 return nil, err
35 }
36 return &pb.File{
37 Name: rel,
38 Contents: blob,
39 }, nil
40}

Callers 2

readFilesFunction · 0.85
BuildRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…