MCPcopy
hub / github.com/open-policy-agent/conftest / ParseConfigurations

Function ParseConfigurations

parser/parser.go:259–266  ·  view source on GitHub ↗

ParseConfigurations parses and returns the configurations from the given list of files. The result will be a map where the key is the file name of the configuration.

(files []string)

Source from the content-addressed store, hash-verified

257// list of files. The result will be a map where the key is the file name of
258// the configuration.
259func ParseConfigurations(files []string) (map[string]any, error) {
260 configurations, err := parseConfigurations(files, "")
261 if err != nil {
262 return nil, err
263 }
264
265 return configurations, nil
266}
267
268// ParseConfigurationsAs parses the files as the given file type and returns the
269// configurations given in the file list. The result will be a map where the key

Callers 7

TestExceptionFunction · 0.92
TestTracingFunction · 0.92
TestMultifileYamlFunction · 0.92
TestDockerfileFunction · 0.92
RunMethod · 0.92
NewParseCommandFunction · 0.92
parseCombinedConfigFilesFunction · 0.92

Calls 1

parseConfigurationsFunction · 0.85

Tested by 4

TestExceptionFunction · 0.74
TestTracingFunction · 0.74
TestMultifileYamlFunction · 0.74
TestDockerfileFunction · 0.74