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

Method withModule

private/bufpkg/bufmodule/module_read_bucket.go:439–454  ·  view source on GitHub ↗
(module Module)

Source from the content-addressed store, hash-verified

437}
438
439func (b *moduleReadBucket) withModule(module Module) *moduleReadBucket {
440 // We want to avoid sync.OnceValueing getBucket Twice, so we have a special copy function here
441 // instead of calling newModuleReadBucket.
442 //
443 // This technically doesn't matter anymore since we don't sync.OnceValue getBucket inside newModuleReadBucket
444 // anymore, but we keep this around in case we change that back.
445 return &moduleReadBucket{
446 getBucket: b.getBucket,
447 module: module,
448 targetPaths: b.targetPaths,
449 targetPathMap: b.targetPathMap,
450 targetExcludePathMap: b.targetExcludePathMap,
451 protoFileTargetPath: b.protoFileTargetPath,
452 includePackageFiles: b.includePackageFiles,
453 }
454}
455
456func (b *moduleReadBucket) ShouldBeSelfContained() bool {
457 return false

Callers 1

withIsTargetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected