Call the engine Reset
This commit is contained in:
parent
68597ea7cc
commit
f88e253486
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user