diff options
author | David Lamb <58757897+klarrio-dlamb@users.noreply.github.com> | 2022-06-30 16:18:15 +1000 |
---|---|---|
committer | David Lamb <asdfasdf.gh@mm.st> | 2024-02-21 17:10:42 +1100 |
commit | ab4ce619a9b5fb0e302d98e58d5968a02fcfcf7c (patch) | |
tree | 71027d4cd2490009eb7966b66880ec0339b47501 | |
parent | d606077eedfbf4b5f40db49672f102ec8e6bbad9 (diff) | |
download | go-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.go | 2 |
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, |