* [feat] Add verbosity levels to the debug package
Use debug.V(N).Log instead of debug.Log to indicate message
verbosity (higher numbers indicate more verbose messages).
Use GOPASS_DEBUG_VERBOSE=N to control the desired level
of verbosity in the log output.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Document the verbosity env vars.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Allow negative verbosity values
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
---------
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Correctly handle new multiline secrets
This commit fixes as small issue in how multi-line secrets are handled.
Before they were always written in to the secret body completly ignoring
the first line that contains the password. Now we do respect that
correctly. To implement that properly we need to have some additional
code to satisfy the io.Writer assumptions around the AKV secret type.
Also this fixes some non-hermetic tests that showed up during testing of
this change.
Fixes#2614
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Fix typo
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Ditch the MultiWriter approach in favor of a pass-through writer
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Format
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
---------
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This PR moves some packages from internal to pkg to increase the
independence of binaries in cmd/ from internal packages further.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>