aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_commit.go
diff options
context:
space:
mode:
authorChris Marchesi <chrism@vancluevertech.com>2018-08-16 18:15:49 -0700
committerChris Marchesi <chrism@vancluevertech.com>2018-08-16 18:15:49 -0700
commitc9b2eac59cf97c9a20ea3e9e5ad9bdef6f1dc82b (patch)
treeb905c3e223a0ef55d267b151a52b1735ebc0bf9b /worktree_commit.go
parent0ef699d06cd038b73ea22a6d1eb19aff2761156f (diff)
downloadgo-git-c9b2eac59cf97c9a20ea3e9e5ad9bdef6f1dc82b.tar.gz
git: Remove use of strings.Builder
This was added in Go 1.10 and is not supported on Go 1.9. Switched to bytes.Buffer to ensure compatibility. Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
Diffstat (limited to 'worktree_commit.go')
-rw-r--r--worktree_commit.go3
1 files changed, 2 insertions, 1 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
}