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

Function getDocFilePathForModuleReadBucket

private/bufpkg/bufmodule/paths.go:59–66  ·  view source on GitHub ↗
(ctx context.Context, bucket ModuleReadBucket)

Source from the content-addressed store, hash-verified

57}
58
59func getDocFilePathForModuleReadBucket(ctx context.Context, bucket ModuleReadBucket) string {
60 for _, docFilePath := range orderedDocFilePaths {
61 if _, err := bucket.StatFileInfo(ctx, docFilePath); err == nil {
62 return docFilePath
63 }
64 }
65 return ""
66}
67
68// getStorageMatcher gets the storage.Matcher that will filter the storage.ReadBucket down to specifically
69// the files that are relevant to a module.

Callers 1

GetDocFileFunction · 0.85

Calls 1

StatFileInfoMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…