Use proper GPG terminology

Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
Hidde Beydals
2021-10-08 19:34:39 +02:00
parent 25283d357e
commit 5249d17a95
7 changed files with 33 additions and 33 deletions

View File

@ -13,9 +13,9 @@ type CommitOptions struct {
// GPGSigningInfo contains information for signing a commit.
type GPGSigningInfo struct {
PrivateKeyPath string
Passphrase string
KeyID string
KeyRingPath string
Passphrase string
KeyID string
}
type GpgSigningOption struct {
@ -27,16 +27,16 @@ func (w GpgSigningOption) ApplyToCommit(in *CommitOptions) {
}
func WithGpgSigningOption(path, passphrase, keyID string) Option {
// return nil info if no path is set
// Return nil if no path is set, even if other options are configured.
if path == "" {
return GpgSigningOption{}
}
return GpgSigningOption{
GPGSigningInfo: &GPGSigningInfo{
PrivateKeyPath: path,
Passphrase: passphrase,
KeyID: keyID,
KeyRingPath: path,
Passphrase: passphrase,
KeyID: keyID,
},
}
}