diff options
-rw-r--r-- | worktree_commit.go | 3 | ||||
-rw-r--r-- | worktree_commit_test.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/worktree_commit.go b/worktree_commit.go index ad7880a..b83bf0c 100644 --- a/worktree_commit.go +++ b/worktree_commit.go @@ -1,6 +1,7 @@ package git import ( + "bytes" "path" "strings" @@ -117,7 +118,7 @@ func (w *Worktree) buildCommitSignature(commit *object.Commit, signKey *openpgp. if err != nil { return "", err } - var b strings.Builder + var b bytes.Buffer if err := openpgp.ArmoredDetachSign(&b, signKey, r, nil); err != nil { return "", err } diff --git a/worktree_commit_test.go b/worktree_commit_test.go index 242d2fd..17a1293 100644 --- a/worktree_commit_test.go +++ b/worktree_commit_test.go @@ -1,6 +1,7 @@ package git import ( + "bytes" "strings" "time" @@ -163,7 +164,7 @@ func (s *WorktreeSuite) TestCommitSign(c *C) { // assertStorageStatus(c, r, 1, 1, 1, expectedHash) // Verify the commit. - pks := new(strings.Builder) + pks := new(bytes.Buffer) pkw, err := armor.Encode(pks, openpgp.PublicKeyType, nil) c.Assert(err, IsNil) |