diff options
| author | Shulhan <ms@kilabit.info> | 2021-02-21 21:41:27 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-02-21 21:41:27 +0700 |
| commit | 34f8dc935260582487bf451b6e9301e83414bb98 (patch) | |
| tree | b89aad6491c1dba8840813400615d8234b95fbf3 /watcher_test.go | |
| parent | e554256948d0f7b4b71dfa78014e2172f11fc1c6 (diff) | |
| download | ciigo-34f8dc935260582487bf451b6e9301e83414bb98.tar.xz | |
all: rewrite to use the watcher
Now that we have the watcher which task are to watch the asciidoc
files and template files, we can use it in server to minimize duplicate
code.
This changes refactoring the htmlGenerator to initialize the HTML
template from internal or memfs, so the caller did not need to check by
itself.
Diffstat (limited to 'watcher_test.go')
| -rw-r--r-- | watcher_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/watcher_test.go b/watcher_test.go index 043266a..e85e053 100644 --- a/watcher_test.go +++ b/watcher_test.go @@ -32,7 +32,12 @@ func TestWatcher(t *testing.T) { os.RemoveAll(testDir) }) - testWatcher, err = newWatcher(testDir, "testdata/html.tmpl") + htmlg, err := newHTMLGenerator(nil, "testdata/html.tmpl", true) + if err != nil { + t.Fatal(err) + } + + testWatcher, err = newWatcher(htmlg, testDir) if err != nil { t.Fatal(err) } |
