summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ghostscript/ghostscript.go8
-rw-r--r--internal/example/example_test.go2
2 files changed, 7 insertions, 3 deletions
diff --git a/contrib/ghostscript/ghostscript.go b/contrib/ghostscript/ghostscript.go
index 2b695b8..3196c34 100644
--- a/contrib/ghostscript/ghostscript.go
+++ b/contrib/ghostscript/ghostscript.go
@@ -51,8 +51,12 @@ func min(name string) {
go func() {
errChan <- cmd.Start()
}()
- newPdf().Output(inPipe)
- report(name, <-errChan)
+ err = newPdf().Output(inPipe)
+ if err == nil {
+ report(name, <-errChan)
+ } else {
+ report(name, err)
+ }
} else {
report(name, err)
}
diff --git a/internal/example/example_test.go b/internal/example/example_test.go
index 8717d45..2765cc0 100644
--- a/internal/example/example_test.go
+++ b/internal/example/example_test.go
@@ -23,7 +23,7 @@ import (
)
// Test the Filename() and Summary() functions.
-func Example_ExampleFilename() {
+func ExampleExample_Filename() {
fileStr := example.Filename("example")
example.Summary(errors.New("printer on fire"), fileStr)
// Output: