( ctx context.Context, value string, )
| 434 | } |
| 435 | |
| 436 | func (a *refParser) GetDirOrProtoFileRef( |
| 437 | ctx context.Context, |
| 438 | value string, |
| 439 | ) (DirOrProtoFileRef, error) { |
| 440 | parsedRef, err := a.getParsedRef(ctx, value, dirOrProtoFileFormats) |
| 441 | if err != nil { |
| 442 | return nil, err |
| 443 | } |
| 444 | switch t := parsedRef.(type) { |
| 445 | case internal.ParsedDirRef: |
| 446 | return newDirRef(t), nil |
| 447 | case internal.ProtoFileRef: |
| 448 | return newProtoFileRef(t), nil |
| 449 | default: |
| 450 | return nil, fmt.Errorf("invalid ParsedRef type: %T", parsedRef) |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | func (a *refParser) GetDirOrProtoFileRefForInputConfig( |
| 455 | ctx context.Context, |
nothing calls this directly
no test coverage detected