From 83f63e773b4dd5516af63ba8d7278e21f96f2062 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 11 Nov 2016 21:44:09 -0500 Subject: Adjust some names of test functions to conform with Go's naming conventions --- check | 2 ++ contrib/barcode/barcode.go | 8 ++++---- contrib/tiff/tiff_test.go | 2 +- fpdf_test.go | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100755 check diff --git a/check b/check new file mode 100755 index 0000000..9492e43 --- /dev/null +++ b/check @@ -0,0 +1,2 @@ +go tool vet -all . +gofmt -s -l . diff --git a/contrib/barcode/barcode.go b/contrib/barcode/barcode.go index 8fb371e..0649564 100644 --- a/contrib/barcode/barcode.go +++ b/contrib/barcode/barcode.go @@ -20,10 +20,6 @@ package barcode import ( "bytes" "errors" - "image/jpeg" - "io" - "strconv" - "sync" "github.com/boombuler/barcode" "github.com/boombuler/barcode/codabar" "github.com/boombuler/barcode/code128" @@ -34,6 +30,10 @@ import ( "github.com/boombuler/barcode/twooffive" "github.com/jung-kurt/gofpdf" "github.com/ruudk/golang-pdf417" + "image/jpeg" + "io" + "strconv" + "sync" ) // barcodes represents the barcodes that have been registered through this diff --git a/contrib/tiff/tiff_test.go b/contrib/tiff/tiff_test.go index 28163a0..d222375 100644 --- a/contrib/tiff/tiff_test.go +++ b/contrib/tiff/tiff_test.go @@ -6,7 +6,7 @@ import ( "github.com/jung-kurt/gofpdf/internal/example" ) -func ExampleTiff() { +func ExampleRegisterFile() { pdf := gofpdf.New("L", "mm", "A4", "") pdf.SetFont("Helvetica", "", 12) pdf.SetFillColor(200, 200, 220) diff --git a/fpdf_test.go b/fpdf_test.go index 9f99568..09346ff 100644 --- a/fpdf_test.go +++ b/fpdf_test.go @@ -1764,7 +1764,7 @@ func ExampleFpdf_AddFontFromBytes() { } // This example demonstrate Clipped table cells -func ExampleFpdf_ClippedTableCells() { +func ExampleFpdf_ClipRect() { marginCell := 2. // margin of top/bottom of cell pdf := gofpdf.New("P", "mm", "A4", "") pdf.SetFont("Arial", "", 12) @@ -1806,8 +1806,8 @@ func ExampleFpdf_ClippedTableCells() { // Successfully generated pdf/Fpdf_ClippedTableCells.pdf } -// This example demonstrate Wrapped table cells -func ExampleFpdf_WrappedTableCells() { +// This example demonstrate wrapped table cells +func ExampleFpdf_Rect() { marginCell := 2. // margin of top/bottom of cell pdf := gofpdf.New("P", "mm", "A4", "") pdf.SetFont("Arial", "", 12) -- cgit v1.2.1-24-ge1ad