Skip to content

Commit ab4ce61

Browse files
dlambdacomplex64
authored and
David Lamb
committed
_examples: PR feedback - use plumbing instead of sprintf
Co-authored-by: Johannes Huning <[email protected]>
1 parent d606077 commit ab4ce61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_examples/checkout-branch/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func main() {
3535
// ... checking out branch
3636
Info("git checkout %s", branch)
3737

38-
branchRefName := fmt.Sprintf("refs/heads/%s", branch)
38+
branchRefName := plumbing.NewBranchReferenceName(branch)
3939
branchCoOpts := git.CheckoutOptions{
4040
Branch: plumbing.ReferenceName(branchRefName),
4141
Force: true,

0 commit comments

Comments
 (0)