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

Method GetDirRefForInputConfig

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

Source from the content-addressed store, hash-verified

418}
419
420func (a *refParser) GetDirRefForInputConfig(
421 ctx context.Context,
422 inputConfig bufconfig.InputConfig,
423) (DirRef, error) {
424 parsedRef, err := a.getParsedRefForInputConfig(ctx, inputConfig, dirFormats)
425 if err != nil {
426 return nil, err
427 }
428 parsedDirRef, ok := parsedRef.(internal.ParsedDirRef)
429 if !ok {
430 // this should never happen
431 return nil, fmt.Errorf("invalid ParsedRef type for source: %T", parsedRef)
432 }
433 return newDirRef(parsedDirRef), nil
434}
435
436func (a *refParser) GetDirOrProtoFileRef(
437 ctx context.Context,

Callers

nothing calls this directly

Calls 2

newDirRefFunction · 0.70

Tested by

no test coverage detected