From ae3cf7205cd34f1725213f327651ebe0a545918d Mon Sep 17 00:00:00 2001 From: Sebastiaan Klippert Date: Thu, 22 Apr 2021 12:31:40 +0200 Subject: [PATCH] update comment on CreateContext, update Travis go versions --- .travis.yml | 2 +- wkhtmltopdf.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8fca41..f6496b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm "wkhtmltox_0.12.6-1.bionic_amd64.deb" ; fi go: - tip + - 1.16 - 1.15 - - 1.14 script: go test -v -coverprofile=coverage.txt -covermode=atomic -bench . os: - linux diff --git a/wkhtmltopdf.go b/wkhtmltopdf.go index 7303039..cbdea70 100644 --- a/wkhtmltopdf.go +++ b/wkhtmltopdf.go @@ -286,10 +286,10 @@ func (pdfg *PDFGenerator) findPath() error { // Create creates the PDF document and stores it in the internal buffer if no error is returned func (pdfg *PDFGenerator) Create() error { - return pdfg.run(context.TODO()) + return pdfg.run(context.Background()) } -// Create creates the PDF document and stores it in the internal buffer if no error is returned +// CreateContext is Create with a context passed to exec.CommandContext when calling wkhtmltopdf func (pdfg *PDFGenerator) CreateContext(ctx context.Context) error { return pdfg.run(ctx) }