From b799c70389290d191c0ec9fba5a2e2b15df96574 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 18 Feb 2016 16:00:22 -0500 Subject: Factor example filenames --- contrib/ghostscript/ghostscript.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'contrib') diff --git a/contrib/ghostscript/ghostscript.go b/contrib/ghostscript/ghostscript.go index f9e5c4f..2b695b8 100644 --- a/contrib/ghostscript/ghostscript.go +++ b/contrib/ghostscript/ghostscript.go @@ -36,13 +36,11 @@ func newPdf() (pdf *gofpdf.Fpdf) { return } -func full() { - const name = "full.pdf" +func full(name string) { report(name, newPdf().OutputFileAndClose(name)) } -func min() { - const name = "min.pdf" +func min(name string) { cmd := exec.Command("gs", "-sDEVICE=pdfwrite", "-dCompatibilityLevel=1.4", "-dPDFSETTINGS=/screen", "-dNOPAUSE", "-dQUIET", @@ -61,6 +59,6 @@ func min() { } func main() { - full() - min() + full("full.pdf") + min("min.pdf") } -- cgit v1.2.1-24-ge1ad