Skip to content

Commit

Permalink
refactor(main.go): simplify error handling for tag and push functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenvanduocit committed Mar 29, 2023
1 parent 780f2f1 commit cadb624
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,12 @@ func main() {
}

printSuccess("Assistant: Next tag is " + nextTag)

if err := tag(nextTag); err != nil {
errGuard(client, err)
}

errGuard(client, tag(nextTag))
printSuccess("Assistant: New tag " + nextTag + " created")
}

if autoPush {
if err := push(); err != nil {
errGuard(client, err)
}
errGuard(client, push())
printSuccess("Assistant: Pushed to remote")
}
}
Expand Down

0 comments on commit cadb624

Please sign in to comment.