diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-23 11:02:05 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-11-25 01:33:07 +0700 |
| commit | a9701f66c2e38a3a7f3d12deed6ebba5144e208e (patch) | |
| tree | 0f4300ba3d35b353b1b0f629a406aa00d563d4fa /awwan.go | |
| parent | d507104c77d6d8bd6b00cc610e8710d326ecd11e (diff) | |
| download | awwan-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.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |
