26 Commits

Author SHA1 Message Date
google-labs-jules[bot]
86720090b6
docs: Add GoDoc to pkg and improve markdown files (#3251)
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>
2025-09-22 19:37:15 +02:00
Dominik Schulz
7281ca8ab4
[chore] Migrate to golangci-lint v2 (#3104)
* [chore] Migrate to golangci-lint v2

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix more lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix more lint issue

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix more lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Add more package comments.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix golangci-lint config and the remaining checks

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Use Go 1.24

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix container builds

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix more failing tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix test failure

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix another len assertion

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Move location tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix most remaining lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Only run XDG specific tests on linux

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Attempt to address on source of flaky failures

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-04-17 08:05:43 +02:00
AnomalRoil
4c2caf3e9b
[FEATURE] Allow for non-interactive age setup (#2970)
* [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>
2024-10-14 19:32:26 +02:00
Callum Andrew
9797b872d3
[BUGFIX] Replace ~ with user homedir if $GOPASS_HOMEDIR is not set (#2961)
Replace `~` with user home directory if `$GOPASS_HOMEDIR` is not set, does not replace `~` if neither are set.

Fixes #2916

Signed-off-by: Callum Andrew <contact@candrew.net>
2024-10-07 12:14:13 +02:00
lhardt
486c165438
[DEPRECATION] Remove references to deprecated rand.Seed (#2953)
Signed-off-by: Léo Hardt <leom.hardt@gmail.com>
2024-09-30 19:46:01 +02:00
Dominik Schulz
3a3051628a
[fix] Pass remote, if given, to local init as well (#2852)
* [fix] Pass remote, if given, to local init as well

This should cover the case when creating a new team with
an existing remote.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Remote some noisy logging and correctly handle the passed remote
location.

Please note that the current implmentation will only work if the remote
is fully empty (i.e. git init --bare, nothing more). If you need to
work with a non-empty remote use gopass clone for the time being.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-30 14:41:39 +01:00
Ludovic Fernandez
b8f0ff8ff2
[chore]: linting (#2840)
Signed-off-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2024-03-25 19:32:57 +01:00
Dominik Schulz
327d431185 Add fsutil.IsNonEmptyFile
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-01-07 10:03:53 +01:00
Dominik Schulz
8bdaa52420
Add --create flag to gopass mounts add (#2502)
This allows creating mounts when adding them.

Fixes #2501

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-01-01 17:15:44 +01:00
Dominik Schulz
1ba67f76e1
Do not rewrite ~ (#2496)
* Do not rewrite ~

Fixes #2083

RELEASE_NOTES=[ENHANCEMENT] Do not rewrite ~.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Honor GOPASS_HOMEDIR

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-28 14:03:02 +01:00
Dominik Schulz
6eed754b4d
Do not decrypt secrets when moving or copying them (#2183)
* Do not decrypt secrets when moving or copying them

This PR attempts to avoid decrypting secrets needlessly when they are
only copied or moved. All currently supported backends have a filesystem
backing them so the old workaround of Get and Set shouldn't be necessary
anymore. In case we re-introduce such backends or a direct move fails
for some reason we still fall back to Get and Set if necessary.

Fixes #2181

RELEASE_NOTES=[ENHANCEMENT] Avoid decryption on move or copy

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add debug log statements

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-04-10 11:45:52 +02:00
Dominik Schulz
16c071a780
Enable golangci-lint on push and pr (#2158)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-24 21:58:53 +01:00
Dominik Schulz
117db90478
Update deps (#2168)
Ran 'make upgrade' (includes gofumpt).

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-17 20:55:53 +01:00
Dominik Schulz
c4b54ad310
Fix some TODOs (#2084) 2022-01-03 20:20:35 +01:00
Dominik Schulz
0eff31a8ce
Enable additional golangci-lint godot checks (#2077) 2021-12-29 22:47:53 +01:00
Dominik Schulz
13b6c18fe6
Fix fsutil.Shred and other cleanup (#2063)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-12-22 19:05:24 +01:00
Dominik Schulz
c781015a2b
Normalize recipient IDs before comparsion (#1953)
Fixes #1900

RELEASE_NOTES=[BUGFIX] Normalize recipient IDs before comparison

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-07-01 22:41:54 +02:00
Dominik Schulz
7892fd23ed
Clean up gpg/cli (#1890)
This commit rearranges the GPG CLI implementation a bit to make things
easier to find and maintain. Effectively it should be a no-op.

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-03-28 18:38:44 +02:00
Dominik Schulz
d9759ffec8
Replace github.com/pkg/errors by stdlib errors (#1750)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-26 09:21:52 +01:00
Dominik Schulz
baf90c9f1d
Allow using tilde in config (#1713)
Fixes #872

RELEASE_NOTES=[BUGFIX] Allow using tilde

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-15 18:26:43 +01:00
Dominik Schulz
ff349772ac
Reduce dependencies on internal packages (#1707)
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>
2021-01-13 18:21:09 +01:00
Dominik Schulz
3ba0d3f629
Speed up gpg initialization (#1528)
Fixes #1527

RELEASE_NOTES=[ENHANCEMENT] Cache gpg binary location

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-08-15 18:29:43 +02:00
Dominik Schulz
2647ce648a
Show recipients from subfolder ids (#1453)
Fixes #954

RELEASE_NOTES=[ENHANCEMENT] Show recipients from subfolder id files

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-07-17 21:45:03 +02:00
Dominik Schulz
5977752c7c
Unexport more internal packages (#1380)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-05-22 21:38:08 +02:00
Dominik Schulz
c36481bb97
Improve create wizard (#842) 2018-06-04 13:47:42 +02:00
Dominik Schulz
da436e6a79
Refactor and cleanup codebase (#715) 2018-03-16 14:22:47 +01:00