From 5552ee818c6d23447020fbe6b0fabce4b60839f1 Mon Sep 17 00:00:00 2001 From: tylermmorton Date: Tue, 24 Oct 2023 23:13:13 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=AA=20watcher=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/tmpl/cmd/bind.go | 1 - compile.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/cmd/tmpl/cmd/bind.go b/cmd/tmpl/cmd/bind.go index 6353231..bd02c76 100644 --- a/cmd/tmpl/cmd/bind.go +++ b/cmd/tmpl/cmd/bind.go @@ -44,7 +44,6 @@ type TemplateBinding struct { FileName string FilePaths []string StructType string - UseWatcher bool } func (b *TemplateBinding) TemplateText() string { diff --git a/compile.go b/compile.go index 320a34f..527831c 100644 --- a/compile.go +++ b/compile.go @@ -144,12 +144,6 @@ func Compile[T TemplateProvider](tp T, opts ...CompilerOption) (Template[T], err return nil, err } - // recursively spawn goroutines to watch for recompile signals - _ = recurseFieldsImplementing[TemplateWatcher](tp, func(w TemplateWatcher, field reflect.StructField) (err error) { - go w.Watch(doCompile) - return - }) - return m, nil }