aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lamb <58757897+klarrio-dlamb@users.noreply.github.com>2022-06-30 16:18:15 +1000
committerDavid Lamb <asdfasdf.gh@mm.st>2024-02-21 17:10:42 +1100
commitab4ce619a9b5fb0e302d98e58d5968a02fcfcf7c (patch)
tree71027d4cd2490009eb7966b66880ec0339b47501
parentd606077eedfbf4b5f40db49672f102ec8e6bbad9 (diff)
downloadgo-git-ab4ce619a9b5fb0e302d98e58d5968a02fcfcf7c.tar.gz
_examples: PR feedback - use plumbing instead of sprintf
Co-authored-by: Johannes Huning <johannes.huning@gmail.com>
-rw-r--r--_examples/checkout-branch/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/_examples/checkout-branch/main.go b/_examples/checkout-branch/main.go
index c7e1333..59dfdfc 100644
--- a/_examples/checkout-branch/main.go
+++ b/_examples/checkout-branch/main.go
@@ -35,7 +35,7 @@ func main() {
// ... checking out branch
Info("git checkout %s", branch)
- branchRefName := fmt.Sprintf("refs/heads/%s", branch)
+ branchRefName := plumbing.NewBranchReferenceName(branch)
branchCoOpts := git.CheckoutOptions{
Branch: plumbing.ReferenceName(branchRefName),
Force: true,