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