From ccda5ced5136b50f18a336a20d1f0727d5b2737c Mon Sep 17 00:00:00 2001 From: vilmibm Date: Mon, 18 May 2020 17:45:47 -0500 Subject: [PATCH] lint --- command/pr_diff.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/command/pr_diff.go b/command/pr_diff.go index f311fcc7a..a6dccdd12 100644 --- a/command/pr_diff.go +++ b/command/pr_diff.go @@ -66,14 +66,8 @@ func prDiff(cmd *cobra.Command, args []string) error { } } - var pr *api.PullRequest - if prNum > 0 { - pr, err = api.PullRequestByNumber(apiClient, baseRepo, prNum) - if err != nil { - return fmt.Errorf("could not find pull request: %w", err) - } - } else { - pr, err = api.PullRequestForBranch(apiClient, baseRepo, "", branchWithOwner) + if prNum < 1 { + pr, err := api.PullRequestForBranch(apiClient, baseRepo, "", branchWithOwner) if err != nil { return fmt.Errorf("could not find pull request: %w", err) }