( ctx context.Context, inputConfig bufconfig.InputConfig, )
| 486 | } |
| 487 | |
| 488 | func (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 |
| 505 | func (a *refParser) getParsedRef( |
nothing calls this directly
no test coverage detected