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

Function loadProtoFile

tools/compiler/compiler.go:188–198  ·  view source on GitHub ↗
(path string, format FileFormat, out protoreflect.ProtoMessage)

Source from the content-addressed store, hash-verified

186}
187
188func loadProtoFile(path string, format FileFormat, out protoreflect.ProtoMessage) error {
189 unmarshaller := proto.Unmarshal
190 if format == TextProto {
191 unmarshaller = prototext.Unmarshal
192 }
193 data, err := loadFile(path)
194 if err != nil {
195 return err
196 }
197 return unmarshaller(data, out)
198}
199
200// InferFileFormat infers the file format from the file path.
201func InferFileFormat(path string) FileFormat {

Callers 3

EnvironmentFileFunction · 0.85
TypeDescriptorSetFileFunction · 0.85
CreateASTMethod · 0.85

Calls 1

loadFileFunction · 0.85

Tested by

no test coverage detected