lash/custom-engin #20

Merged
lash merged 13 commits from lash/custom-engin into master 2025-02-06 11:11:49 +01:00
Showing only changes of commit f88e253486 - Show all commits

View File

@ -2,6 +2,7 @@ package engine
import (
"context"
"fmt"
"git.defalsify.org/vise.git/engine"
"git.defalsify.org/vise.git/resource"
@ -19,7 +20,12 @@ func NewSarafuEngine(cfg engine.Config, rs resource.Resource) *SarafuEngine {
func (se *SarafuEngine) Exec(ctx context.Context, input []byte) (bool, error) {
if len(input) == 0 {
panic("insert something here")
e, ok := se.Engine.(*engine.DefaultEngine)
if !ok {
return false, fmt.Errorf("")
}
e.Reset(ctx, true)
}
return se.Engine.Exec(ctx, input)
}