MCPcopy Index your code
hub / github.com/bufbuild/buf / LocalModuleWithTargetPaths

Function LocalModuleWithTargetPaths

private/bufpkg/bufmodule/module_set_builder.go:200–208  ·  view source on GitHub ↗

LocalModuleWithTargetPaths returns a new LocalModuleOption that specifically targets the given paths, and specifically excludes the given paths. Only valid for a targeted Module. If this option is given to a non-target Module, this will result in an error during Build().

(
	targetPaths []string,
	targetExcludePaths []string,
)

Source from the content-addressed store, hash-verified

198// Only valid for a targeted Module. If this option is given to a non-target Module, this will
199// result in an error during Build().
200func LocalModuleWithTargetPaths(
201 targetPaths []string,
202 targetExcludePaths []string,
203) LocalModuleOption {
204 return func(localModuleOptions *localModuleOptions) {
205 localModuleOptions.targetPaths = targetPaths
206 localModuleOptions.targetExcludePaths = targetExcludePaths
207 }
208}
209
210// LocalModuleWithProtoFileTargetPath returns a new LocalModuleOption that specifically targets
211// a single .proto file, and optionally targets all other .proto files that are in the same package.

Calls

no outgoing calls

Tested by 1

TestBasicFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…