loadModuleInline loads a module from a JSON raw message which decodes to a map[string]any, where one of the object keys is moduleNameKey and the corresponding value is the module name (as a string) which can be found in the given scope. In other words, the module name is declared in-line with the mo
(moduleNameKey, moduleScope string, raw json.RawMessage)
| 476 | // no custom keys). In other words, the key containing the module name is |
| 477 | // treated special/separate from all the other keys in the object. |
| 478 | func (ctx Context) loadModuleInline(moduleNameKey, moduleScope string, raw json.RawMessage) (any, error) { |
| 479 | moduleName, raw, err := getModuleNameInline(moduleNameKey, raw) |
| 480 | if err != nil { |
| 481 | return nil, err |
| 482 | } |
| 483 | |
| 484 | val, err := ctx.LoadModuleByID(moduleScope+"."+moduleName, raw) |
| 485 | if err != nil { |
| 486 | return nil, fmt.Errorf("loading module '%s': %v", moduleName, err) |
| 487 | } |
| 488 | |
| 489 | return val, nil |
| 490 | } |
| 491 | |
| 492 | // App returns the configured app named name. If that app has |
| 493 | // not yet been loaded and provisioned, it will be immediately |
no test coverage detected