(fp functionProvider, functionName string)
| 485 | } |
| 486 | |
| 487 | func (m *moduleDef) GetFunction(fp functionProvider, functionName string) (*modFunction, error) { |
| 488 | for _, fn := range fp.GetFunctions() { |
| 489 | if fn.Name == functionName || fn.CmdName() == functionName { |
| 490 | if err := m.LoadFunctionTypeDefs(fn); err != nil { |
| 491 | return nil, err |
| 492 | } |
| 493 | return fn, nil |
| 494 | } |
| 495 | } |
| 496 | return nil, fmt.Errorf("no function %q in type %q", functionName, fp.ProviderName()) |
| 497 | } |
| 498 | |
| 499 | // GetInterface retrieves a saved interface type definition from the module. |
| 500 | func (m *moduleDef) GetInterface(name string) *modInterface { |
no test coverage detected