Make PromptKit profile handling safer and more consistent
This commit is contained in:
@@ -24,10 +24,6 @@ func NewInputAdapterRegistry() *InputAdapterRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *InputAdapterRegistry) Register(key string, constructor InputAdapterConstructor) error {
|
||||
return r.RegisterWithSpec(defaultModuleSpec(key, StageInput), constructor)
|
||||
}
|
||||
|
||||
func (r *InputAdapterRegistry) RegisterWithSpec(spec ModuleSpec, constructor InputAdapterConstructor) error {
|
||||
if constructor == nil {
|
||||
return fmt.Errorf("input adapter constructor for %q must not be nil", strings.TrimSpace(spec.Key))
|
||||
|
||||
Reference in New Issue
Block a user