From c94b671d9d0f29273802bb457a03b29b1a577600 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 9 Jun 2022 23:47:05 +0200 Subject: [PATCH] go(version): switch from log to fmt for printing --- cmd/version.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/version.go b/cmd/version.go index b19bbe2..0a6b567 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -4,7 +4,7 @@ package cmd import ( - "log" + "fmt" "os" "github.com/spf13/cobra" @@ -21,7 +21,7 @@ Short: "Print version information and exit", Long: `All software has versions. This is ` + appName + `'s`, RunE: func(cmd *cobra.Command, args []string) error { - log.Println(getVersion()) + fmt.Fprintln(os.Stderr, getVersion()) return nil }, PersistentPostRun: func(cmd *cobra.Command, args []string) {