MCPcopy Create free account
hub / github.com/cel-expr/cel-go / fileDescriptorSet

Function fileDescriptorSet

tools/celtest/test_runner.go:521–531  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

519}
520
521func fileDescriptorSet(path string) (*descpb.FileDescriptorSet, error) {
522 bytes, err := os.ReadFile(path)
523 if err != nil {
524 return nil, fmt.Errorf("failed to read file descriptor set file %q: %v", fileDescriptorSetPath, err)
525 }
526 fds := &descpb.FileDescriptorSet{}
527 if err := proto.Unmarshal(bytes, fds); err != nil {
528 return nil, fmt.Errorf("failed to unmarshal file descriptor set file %q: %v", fileDescriptorSetPath, err)
529 }
530 return fds, nil
531}
532
533// PartialEvalProgramOption returns a TestRunnerOption which enables partial evaluation for the CEL
534// program by setting the OptPartialEval eval option.

Callers 1

FileDescriptorSetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected