diff options
| author | Shulhan <ms@kilabit.info> | 2022-02-19 12:56:54 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-02-19 12:56:54 +0700 |
| commit | 61fa9a7afb943f68f4559ddfb7c589da9a058944 (patch) | |
| tree | b2e15bec5cf83ba5414f8ac3122003b25914b9bb | |
| parent | fdc557949e898f7284a080c75231a438f8f998b5 (diff) | |
| download | ciigo-61fa9a7afb943f68f4559ddfb7c589da9a058944.tar.xz | |
all: realign all structs
Changes,
* fileMarkup: realign from 56 to 48 bytes (-8 bytes)
* htmlGenerator: realign from 32 to 24 bytes (-8 bytes)
* watcher: realign from 48 to 40 bytes (-8 bytes)
| -rw-r--r-- | filemarkup.go | 10 | ||||
| -rw-r--r-- | htmlgenerator.go | 2 | ||||
| -rw-r--r-- | watcher.go | 8 |
3 files changed, 11 insertions, 9 deletions
diff --git a/filemarkup.go b/filemarkup.go index a7c17ed..9748e13 100644 --- a/filemarkup.go +++ b/filemarkup.go @@ -12,10 +12,12 @@ import ( ) type fileMarkup struct { - path string // path contains full path to markup file. - info os.FileInfo // info contains FileInfo of markup file. - basePath string // basePath contains full path to file without markup extension. - fhtml *fileHtml // The HTML output of this markup. + fhtml *fileHtml // The HTML output of this markup. + info os.FileInfo // info contains FileInfo of markup file. + + basePath string // basePath contains full path to file without markup extension. + path string // path contains full path to markup file. + } func newFileMarkup(filePath string, fi os.FileInfo) (fmarkup *fileMarkup, err error) { diff --git a/htmlgenerator.go b/htmlgenerator.go index 4819217..cd0facf 100644 --- a/htmlgenerator.go +++ b/htmlgenerator.go @@ -19,9 +19,9 @@ import ( // htmlGenerator provide a template to write full HTML file. // type htmlGenerator struct { - htmlTemplate string tmpl *template.Template tmplSearch *template.Template + htmlTemplate string } func newHTMLGenerator(mfs *memfs.MemFS, htmlTemplate string, devel bool) ( @@ -21,16 +21,16 @@ import ( // automatically to HTML. // type watcher struct { - dir string - htmlg *htmlGenerator - dw *libio.DirWatcher + changes *clise.Clise + dw *libio.DirWatcher + htmlg *htmlGenerator // fileMarkups contains all markup files found inside "dir". // Its used to convert all markup files when the template file // changes. fileMarkups map[string]*fileMarkup - changes *clise.Clise + dir string } // |
