MCPcopy Create free account
hub / github.com/bufbuild/buf / trackModule

Method trackModule

private/bufpkg/bufmodule/proto_file_tracker.go:48–54  ·  view source on GitHub ↗

trackModule says to track the Module to see if it has any .proto files. If this is never called, it will simply result in no NoProtoFilesErrors being produced.

(module Module)

Source from the content-addressed store, hash-verified

46//
47// If this is never called, it will simply result in no NoProtoFilesErrors being produced.
48func (t *protoFileTracker) trackModule(module Module) {
49 opaqueID := module.OpaqueID()
50 if _, ok := t.opaqueIDToProtoFileExists[opaqueID]; !ok {
51 t.opaqueIDToProtoFileExists[opaqueID] = false
52 }
53 t.opaqueIDToDescription[opaqueID] = module.Description()
54}
55
56// trackFileInfo says to track the FileInfo to mark its associated Module as having .proto files
57// if the FileInfo represents a .proto file, and to mark its path as having the associated Module's

Callers 2

WalkFileInfosMethod · 0.80
getModuleDepsRecFunction · 0.80

Calls 2

OpaqueIDMethod · 0.65
DescriptionMethod · 0.65

Tested by

no test coverage detected