This change adds GoDoc comments to many of the public symbols in the
`pkg/` directory. It also includes various improvements to the
documentation in `README.md` and other markdown files in the `docs/`
directory.
This is a partial documentation effort, as requested by the user, to
get a pull request submitted quickly.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* [FEATURE] Allow for non-interactive age setup
Also updates Go to Go 1.23.2 and get rid of min and max functions
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
* [n/a] also renaming clear for Windows
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
* [n/a] bumping our GHA to Go 1.23
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
* [n/a] make our harden runner softer
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
* [n/a] make our harden runner accept go.dev
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
* [n/a] applying code review changes
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
---------
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
* [bugfix] Fix loading of git configs
The gitconfig package was incorrectly using gopass specific
locations when trying to load global (per user) git configs.
This change makes it use the correct locations.
Fixes#2686
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Fix typo
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Fix linter issues
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Fix failing tests
Those started to fail because we are now correctly reading
global git configs.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
---------
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* [CLEANUP] Moving options to the correct config section
This adds an easy migration path to our config handling, which should
allow us to migrate option names around much more easily in the future.
Any system level config or env variables options are not migrated.
This also fixes a bug in our test code, where the root mount path was
not properly set in our config, because we used "path:" instead of
"path=" to set it.
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [DOCUMENTATION] Document legacy options and their migration path
This also makes sure that legacy options aren't used in the code anymore using the docs test and its regexp
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [n/a] Removing weird spaces from changelog
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [DOCUMENTATION] Reformatting our Markdown tables properly
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [TESTING] Patching a timezone bug in tests
This is a fun one where if your Timezone isn't UTC and you are past midnight but it's not past midnight UTC, the tests would fail because you're not using the right date to validate it.
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [n/a] Fix a typo and use the correct Env variables in the doc about the custom Env variables
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [BREAKING] Custom Env options moved from GOPASS_CONFIG_CONFIG_KEY_i to GOPASS_CONFIG_KEY_i
As discussed in #2617, this actually reflects the way GIT_CONFIG works.
It also fixes a potential Panic in our codebase when IsSet was called
without any Preset config on a non-existing key.
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [CLEANUP] Patching all of the new linter complaints
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [CLEANUP] Use Go1.21 everywhere
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [n/a] Increase our Golangci timeout
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
* [n/a] code review comment and extra regression test
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
---------
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
Running gci in order to make sure we have properly deterministic imports
RELEASE_NOTES=n/a
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
Having password prompts/etc on stdout is inconvenient in any context where the output is being piped to something other than a terminal. This change makes gopass more scripting-friendly, especially when using the age backend. It also removes a redundant password prompt message when the age backend asks for a password, since pinentry will display its own password prompt immediately afterward.
RELEASE_NOTES=[ENHANCEMENT] Move password prompts to stderr
Signed-off-by: Faye Duxovni <duxovni@duxovni.org>
When gopass can't find a pinentry binary to use for prompting for a
password to unlock an age keyring, it uses its own barebones fallback
pinentry mechanism to prompt for a password in the terminal. This
fallback pinentry always asked the user to retype their password and
required the password match, even when decrypting a file using an
already-existing password. I've updated it to only prompt for a repeat
when necessary, and also made the password prompte messages less
awkward.
RELEASE_NOTES=[BUGFIX] Don't prompt to retype password unnecessarily
with age backend when pinentry binary is unavailable.
Signed-off-by: Faye Duxovni <duxovni@duxovni.org>
This commit adds the option to format the progress bar numbers as human
readable bytes.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit renames the existing out methods that expect
a format string to include the common f suffix and introduces
new out methods without this suffix that don't accept a
format string or variadic arguments.
Fixes#1793
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This should cut all remaining ties and allow binaries in cmd/ to be
moved out.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit reduces the usage of internal/ packages in auxiliary
binaries so we can get closer to eventually moving them to their own
repos.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* feat: support windows
Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
* fix: revert unnecessary changes
Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
* fix: remove useless test
Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
* make tests run on windows and osx
* add osx and windows as test target
* add slow test factor as osx doesn't seem to be fast enough to capture the test interval
* reset buildflags on windows as no PIC code can be built
* append .exe to gopass output
* fix some tests on windows, disable others
Signed-off-by: Martin Hoefling <martin.hoefling@gmx.de>
* kill gpg and test commands on windows after test
Signed-off-by: Martin Hoefling <martin.hoefling@gmx.de>
* disable problematic clipboard and jsonapi tests under windows
Signed-off-by: Martin Hoefling <martin.hoefling@gmx.de>
Grouped in the following order:
1. Packages from the std library
2. golang.org imports
3. github.com/justwatchcom/gopass packages
4. External dependencies
Sorted by gofmt.