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

Method GetModuleRefForInputConfig

private/buf/buffetch/ref_parser.go:488–502  ·  view source on GitHub ↗
(
	ctx context.Context,
	inputConfig bufconfig.InputConfig,
)

Source from the content-addressed store, hash-verified

486}
487
488func (a *refParser) GetModuleRefForInputConfig(
489 ctx context.Context,
490 inputConfig bufconfig.InputConfig,
491) (ModuleRef, error) {
492 parsedRef, err := a.getParsedRefForInputConfig(ctx, inputConfig, moduleFormats)
493 if err != nil {
494 return nil, err
495 }
496 parsedModuleRef, ok := parsedRef.(internal.ParsedModuleRef)
497 if !ok {
498 // this should never happen
499 return nil, fmt.Errorf("invalid ParsedRef type for source: %T", parsedRef)
500 }
501 return newModuleRef(parsedModuleRef), nil
502}
503
504// TODO FUTURE: rename to getParsedRefForString
505func (a *refParser) getParsedRef(

Callers

nothing calls this directly

Calls 2

newModuleRefFunction · 0.70

Tested by

no test coverage detected