Skip to content

Commit 779c5fb

Browse files
committed
Move gpg agent related code in pkg/gpgagent
1 parent f45722e commit 779c5fb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

internal/trousseau/context.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"path/filepath"
77

8+
"github.com/oleiade/trousseau/pkg/gpgagent"
89
"github.com/tmc/keyring"
910
)
1011

@@ -102,12 +103,12 @@ func GetPassphrase() (passphrase string, err error) {
102103
}
103104

104105
func getGpgPassphrase(gpgId string) (string, error) {
105-
conn, err := NewGpgAgentConn()
106+
conn, err := gpgagent.NewGpgAgentConn()
106107
if err != nil {
107108
return "", err
108109
}
109110

110-
passphraseRequest := &PassphraseRequest{CacheKey: gpgId}
111+
passphraseRequest := &gpgagent.PassphraseRequest{CacheKey: gpgId}
111112
passphrase, err := conn.GetPassphrase(passphraseRequest)
112113
if err != nil {
113114
return "", err

internal/trousseau/gpgagent.go pkg/gpgagent/gpgagent.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
*/
1616

1717
// Package gpgagent interacts with the local GPG Agent.
18-
package trousseau
18+
package gpgagent
1919

2020
import (
2121
"bufio"

internal/trousseau/gpgagent_test.go pkg/gpgagent/gpgagent_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package trousseau
17+
package gpgagent
1818

1919
import (
2020
"fmt"

0 commit comments

Comments
 (0)