mirror of
https://github.com/fluxcd/flux2.git
synced 2025-11-02 02:35:49 +08:00
Use proper GPG terminology
Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user