Skip to content

Commit

Permalink
🔪 watcher api
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermmorton committed Oct 25, 2023
1 parent 0327343 commit 5552ee8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion cmd/tmpl/cmd/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ type TemplateBinding struct {
FileName string
FilePaths []string
StructType string
UseWatcher bool
}

func (b *TemplateBinding) TemplateText() string {
Expand Down
6 changes: 0 additions & 6 deletions compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 5552ee8

Please sign in to comment.