fix: missing returning error and free callback stream (#187)

This commit is contained in:
Ettore Di Giacinto 2023-05-04 19:49:43 +02:00 committed by GitHub
parent 77ce8b953e
commit 714bfcd45b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 16 deletions

View file

@ -81,10 +81,9 @@ func (ml *ModelLoader) TemplatePrefix(modelName string, in interface{}) (string,
if exists {
m = t
}
}
if m == nil {
return "", nil
return "", fmt.Errorf("failed loading any template")
}
var buf bytes.Buffer