diff options
-rw-r--r-- | contrib/barcode/barcode_test.go | 7 | ||||
-rw-r--r-- | contrib/httpimg/httpimg_test.go | 7 | ||||
-rw-r--r-- | fpdf_test.go | 3 | ||||
-rw-r--r-- | internal/example/example.go | 3 |
4 files changed, 3 insertions, 17 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) diff --git a/fpdf_test.go b/fpdf_test.go index 2238ccd..e45f966 100644 --- a/fpdf_test.go +++ b/fpdf_test.go @@ -28,7 +28,6 @@ import ( "path/filepath" "strconv" "strings" - "time" "github.com/jung-kurt/gofpdf" "github.com/jung-kurt/gofpdf/internal/example" @@ -36,8 +35,6 @@ import ( func init() { cleanup() - gofpdf.SetDefaultCatalogSort(true) - gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)) } func cleanup() { 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 |