X Tutup
Skip to content

Commit 2979c5f

Browse files
committed
Use embeding
1 parent 9b5f7a8 commit 2979c5f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

api/queries_pr.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ type PullRequest struct {
5050
}
5151

5252
type NotFoundError struct {
53-
message string
54-
}
55-
56-
func (e *NotFoundError) Error() string {
57-
return e.message
53+
error
5854
}
5955

6056
func (pr PullRequest) HeadLabel() string {
@@ -376,7 +372,7 @@ func PullRequestForBranch(client *Client, ghRepo Repo, branch string) (*PullRequ
376372
}
377373
}
378374

379-
return nil, &NotFoundError{message: fmt.Sprintf("no open pull requests found for branch %q", branch)}
375+
return nil, &NotFoundError{fmt.Errorf("no open pull requests found for branch %q", branch)}
380376
}
381377

382378
func CreatePullRequest(client *Client, ghRepo Repo, params map[string]interface{}) (*PullRequest, error) {

0 commit comments

Comments
 (0)
X Tutup