aboutsummaryrefslogtreecommitdiff
path: root/awwan.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-23 11:02:05 +0700
committerShulhan <ms@kilabit.info>2023-11-25 01:33:07 +0700
commita9701f66c2e38a3a7f3d12deed6ebba5144e208e (patch)
tree0f4300ba3d35b353b1b0f629a406aa00d563d4fa /awwan.go
parentd507104c77d6d8bd6b00cc610e8710d326ecd11e (diff)
downloadawwan-a9701f66c2e38a3a7f3d12deed6ebba5144e208e.tar.xz
all: print non error information using package log instead of fmt
Although log print to stderr, this allow user to filter between awwan output and command output, for example by piping stderr to /dev/null $ awwan env-get "key" dir/ 2>/dev/null The output env-get is not poluted by other logs.
Diffstat (limited to 'awwan.go')
-rw-r--r--awwan.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/awwan.go b/awwan.go
index 030d284..5752f4b 100644
--- a/awwan.go
+++ b/awwan.go
@@ -5,6 +5,7 @@ package awwan
import (
"fmt"
+ "log"
"os"
"path/filepath"
"strings"
@@ -93,7 +94,7 @@ func (aww *Awwan) init(baseDir string) (err error) {
return err
}
- fmt.Printf("--- BaseDir: %s\n", aww.BaseDir)
+ log.Printf(`--- BaseDir: %s`, aww.BaseDir)
aww.cryptoc = newCryptoContext(aww.BaseDir)