MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / load

Method load

internal/descriptor/registry.go:247–269  ·  view source on GitHub ↗
(gen *protogen.Plugin)

Source from the content-addressed store, hash-verified

245}
246
247func (r *Registry) load(gen *protogen.Plugin) error {
248 filePaths := make([]string, 0, len(gen.FilesByPath))
249 for filePath := range gen.FilesByPath {
250 filePaths = append(filePaths, filePath)
251 }
252 sort.Strings(filePaths)
253
254 for _, filePath := range filePaths {
255 r.loadFile(filePath, gen.FilesByPath[filePath])
256 }
257
258 for _, filePath := range filePaths {
259 if !gen.FilesByPath[filePath].Generate {
260 continue
261 }
262 file := r.files[filePath]
263 if err := r.loadServices(file); err != nil {
264 return err
265 }
266 }
267
268 return nil
269}
270
271// loadFile loads messages, enumerations and fields from "file".
272// It does not load services and methods in "file". You need to call

Callers 2

LoadMethod · 0.95
LoadFromPluginMethod · 0.95

Calls 2

loadFileMethod · 0.95
loadServicesMethod · 0.95

Tested by

no test coverage detected