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

Method GetDirRef

private/buf/buffetch/ref_parser.go:404–418  ·  view source on GitHub ↗
(
	ctx context.Context,
	value string,
)

Source from the content-addressed store, hash-verified

402}
403
404func (a *refParser) GetDirRef(
405 ctx context.Context,
406 value string,
407) (DirRef, error) {
408 parsedRef, err := a.getParsedRef(ctx, value, dirFormats)
409 if err != nil {
410 return nil, err
411 }
412 parsedDirRef, ok := parsedRef.(internal.ParsedDirRef)
413 if !ok {
414 // this should never happen
415 return nil, fmt.Errorf("invalid ParsedRef type for source: %T", parsedRef)
416 }
417 return newDirRef(parsedDirRef), nil
418}
419
420func (a *refParser) GetDirRefForInputConfig(
421 ctx context.Context,

Callers

nothing calls this directly

Calls 2

getParsedRefMethod · 0.95
newDirRefFunction · 0.70

Tested by

no test coverage detected