From 281287937eb459caf4e08aae69a0b040d5227f1e Mon Sep 17 00:00:00 2001 From: milarin Date: Fri, 7 Apr 2023 15:24:39 +0200 Subject: [PATCH] improved command line argument handling --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 42b7839..5731654 100644 --- a/main.go +++ b/main.go @@ -80,7 +80,6 @@ func Convert(inputFilePath string) { } outputFilePath := fmt.Sprintf("%s.pdf", filepath.Base(inputFilePath)[:len(inputFilePath)-len(filepath.Ext(inputFilePath))]) - fmt.Println(outputFilePath) args := append([]string{"--output", outputFilePath}, tempFiles...) img2pdf := exec.Command("img2pdf", args...) @@ -93,4 +92,6 @@ func Convert(inputFilePath string) { ColorRed.Fprintf(os.Stderr, "img2pdf returned an error: %s\n", err.Error()) os.Exit(1) } + + fmt.Println(outputFilePath) }