From 66de656c58127811f119b9b8d34022438906d5de Mon Sep 17 00:00:00 2001 From: Jelmer Snoeck Date: Mon, 24 Aug 2015 22:42:03 +0100 Subject: Use RegisterHttpImage instead of RegisterRemoteImage. Remote can mean several things, HTTP is more specific and matches the actual implementation. --- contrib/fhttp/fhttp_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/fhttp/fhttp_test.go') diff --git a/contrib/fhttp/fhttp_test.go b/contrib/fhttp/fhttp_test.go index 57bf175..e09328a 100644 --- a/contrib/fhttp/fhttp_test.go +++ b/contrib/fhttp/fhttp_test.go @@ -25,19 +25,19 @@ func summary(err error, fileStr string) { } } -func ExampleFpdf_AddRemoteImage() { +func ExampleFpdf_AddHttpImage() { pdf := gofpdf.New("", "", "", "") pdf.SetFont("Helvetica", "", 12) pdf.SetFillColor(200, 200, 220) pdf.AddPage() url := "https://github.com/jung-kurt/gofpdf/raw/master/image/logo_gofpdf.jpg?raw=true" - fhttp.RegisterRemoteImage(pdf, url, "") + fhttp.RegisterHttpImage(pdf, url, "") pdf.Image(url, 100, 100, 20, 20, false, "", 0, "") - fileStr := exampleFilename("Fpdf_AddRemoteImage") + fileStr := exampleFilename("Fpdf_AddHttpImage") err := pdf.OutputFileAndClose(fileStr) summary(err, fileStr) // Output: - // Successfully generated pdf/Fpdf_AddRemoteImage.pdf + // Successfully generated pdf/Fpdf_AddHttpImage.pdf } -- cgit v1.2.1-24-ge1ad