rebuild parser on refresh

This commit is contained in:
bel
2023-03-24 22:15:36 -06:00
parent a9ca58f154
commit 610aef4f7e
2 changed files with 5 additions and 4 deletions

View File

@@ -12,9 +12,9 @@ type Wrap interface {
Close()
}
func New(ctx context.Context, src button.Parser) Wrap {
func New(ctx context.Context, srcFunc func() button.Parser) Wrap {
maker := func() Wrap {
return src
return srcFunc()
}
if os.Getenv("WRAP_BUFFERED") == "true" {
oldMaker := maker