summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-10-11 09:16:21 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-10-11 09:16:21 -0400
commiteca9f96fbf9b6be62915d111546f4798ce3fac62 (patch)
tree9c032e3059ead75dbd4d0f5bb1e2c57fdea36ad2 /contrib
parent1a24a3acc57b8e20d718efbc5c141b980bbb8a38 (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 'contrib')
-rw-r--r--contrib/barcode/barcode_test.go7
-rw-r--r--contrib/httpimg/httpimg_test.go7
2 files changed, 0 insertions, 14 deletions
diff --git a/contrib/barcode/barcode_test.go b/contrib/barcode/barcode_test.go
index 86aafcc..c12ff12 100644
--- a/contrib/barcode/barcode_test.go
+++ b/contrib/barcode/barcode_test.go
@@ -1,8 +1,6 @@
package barcode_test
import (
- "time"
-
"github.com/boombuler/barcode/code128"
"github.com/boombuler/barcode/qr"
"github.com/jung-kurt/gofpdf"
@@ -10,11 +8,6 @@ import (
"github.com/jung-kurt/gofpdf/internal/example"
)
-func init() {
- gofpdf.SetDefaultCatalogSort(true)
- gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC))
-}
-
func createPdf() (pdf *gofpdf.Fpdf) {
pdf = gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)
diff --git a/contrib/httpimg/httpimg_test.go b/contrib/httpimg/httpimg_test.go
index 6390f09..bf13492 100644
--- a/contrib/httpimg/httpimg_test.go
+++ b/contrib/httpimg/httpimg_test.go
@@ -1,18 +1,11 @@
package httpimg_test
import (
- "time"
-
"github.com/jung-kurt/gofpdf"
"github.com/jung-kurt/gofpdf/contrib/httpimg"
"github.com/jung-kurt/gofpdf/internal/example"
)
-func init() {
- gofpdf.SetDefaultCatalogSort(true)
- gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC))
-}
-
func ExampleRegister() {
pdf := gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)