refactor: use variable to make more readable

This commit is contained in:
decentral1se 2021-07-30 17:09:23 +02:00
parent d97da9f45c
commit 58bdb456df
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 2 additions and 4 deletions

View File

@ -95,10 +95,8 @@ func (a App) EnsureVersion(version string) error {
return err
}
if err := worktree.Checkout(&git.CheckoutOptions{
Branch: tagRef,
Keep: true,
}); err != nil {
opts := &git.CheckoutOptions{Branch: tagRef, Keep: true}
if err := worktree.Checkout(opts); err != nil {
return err
}