diff --git a/dir.go b/dir.go index 62c8c33..7e5f2ed 100644 --- a/dir.go +++ b/dir.go @@ -139,6 +139,11 @@ func (d *Dir) manipulate(cfg *Config) error { return nil } +// Format represents an output format. +type Format interface { + Format(*Page) (path string, content []byte) +} + // write writes the Dir to the provided destination path. func (d *Dir) write(dstDir string, format Format) error { // Create the directory diff --git a/format.go b/format.go deleted file mode 100644 index f2dab49..0000000 --- a/format.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -// Format represents an output format. -type Format interface { - Format(*Page) (path string, content []byte) -} - -type FormatFunc func(*Page) (string, []byte) - -func (f FormatFunc) Format(p *Page) (string, []byte) { - return f(p) -}