MCPcopy
hub / github.com/open-policy-agent/gatekeeper / readFiles

Function readFiles

pkg/gator/reader/filereader.go:113–124  ·  view source on GitHub ↗
(filenames []string)

Source from the content-addressed store, hash-verified

111}
112
113func readFiles(filenames []string) ([]*source, error) {
114 var sources []*source
115 for _, f := range filenames {
116 s, err := readFile(f)
117 if err != nil {
118 return nil, err
119 }
120 sources = append(sources, s...)
121 }
122
123 return sources, nil
124}
125
126// verifyFile checks that the filenames aren't themselves disallowed extensions.
127// This yields a much better user experience when the user mis-uses the

Callers 1

ReadSourcesFunction · 0.85

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…