diff options
author | Kurt Jung <kurt.w.jung@gmail.com> | 2015-10-11 09:16:21 -0400 |
---|---|---|
committer | Kurt Jung <kurt.w.jung@gmail.com> | 2015-10-11 09:16:21 -0400 |
commit | eca9f96fbf9b6be62915d111546f4798ce3fac62 (patch) | |
tree | 9c032e3059ead75dbd4d0f5bb1e2c57fdea36ad2 /internal/example | |
parent | 1a24a3acc57b8e20d718efbc5c141b980bbb8a38 (diff) |
Move default assignments to init function of example file from various test files. Now any package that imports the example package will generate PDFs with sorted catalogs and a fixed creation timestamp.
Diffstat (limited to 'internal/example')
-rw-r--r-- | internal/example/example.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/example/example.go b/internal/example/example.go index b29561c..56ffb23 100644 --- a/internal/example/example.go +++ b/internal/example/example.go @@ -22,6 +22,7 @@ import ( "os" "path/filepath" "strings" + "time" "github.com/jung-kurt/gofpdf" ) @@ -30,6 +31,8 @@ var gofpdfDir string func init() { setRoot() + gofpdf.SetDefaultCatalogSort(true) + gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)) } // Assign the relative path to the gofpdfDir directory based on current working |