RegisterDeprecated adds module factory function to global registry. It prints warning to the log about name being deprecated and suggests using a new name.
(name, newName string, factory FuncNewModule)
| 76 | // It prints warning to the log about name being deprecated and suggests using |
| 77 | // a new name. |
| 78 | func RegisterDeprecated(name, newName string, factory FuncNewModule) { |
| 79 | Register(name, func(c *container.C, modName, instName string) (module.Module, error) { |
| 80 | log.Printf("module initialized via deprecated name %s, %s should be used instead; deprecated name may be removed in the next version", name, newName) |
| 81 | return factory(c, modName, instName) |
| 82 | }) |
| 83 | } |
| 84 | |
| 85 | // Get returns module from global registry. |
| 86 | // |