aboutsummaryrefslogtreecommitdiff
path: root/gocryptfs-xray/xray_main.go
diff options
context:
space:
mode:
authorVladimir Palevich2023-09-02 15:36:39 +0300
committerrfjakob2023-09-05 17:03:21 +0200
commit8b1c4b0e07d72a2050f6bae29cf4b58ea1ec21c7 (patch)
treea625c6c757320fe1450c6cd7feda976ef94a5ad8 /gocryptfs-xray/xray_main.go
parent0f11c7780d6b3f6b23686955846b27ef5966da03 (diff)
Print errors to stderr
Diffstat (limited to 'gocryptfs-xray/xray_main.go')
-rw-r--r--gocryptfs-xray/xray_main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/gocryptfs-xray/xray_main.go b/gocryptfs-xray/xray_main.go
index 534a400..2bc98f0 100644
--- a/gocryptfs-xray/xray_main.go
+++ b/gocryptfs-xray/xray_main.go
@@ -107,7 +107,7 @@ func main() {
s := sum(args.dumpmasterkey, args.decryptPaths, args.encryptPaths)
if s > 1 {
- fmt.Printf("fatal: %d operations were requested\n", s)
+ fmt.Fprintf(os.Stderr, "fatal: %d operations were requested\n", s)
os.Exit(1)
}
if flag.NArg() != 1 {
@@ -183,7 +183,7 @@ func inspectCiphertext(args *argContainer, fd *os.File) {
fmt.Println("empty file")
os.Exit(0)
} else if err == io.EOF {
- fmt.Printf("incomplete file header: read %d bytes, want %d\n", n, contentenc.HeaderLen)
+ fmt.Fprintf(os.Stderr, "incomplete file header: read %d bytes, want %d\n", n, contentenc.HeaderLen)
os.Exit(1)
} else if err != nil {
errExit(err)