From 15648d291a250256dbe33a8d9c516ba6a49e5f18 Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 18 Jul 2022 12:30:43 +0800 Subject: [PATCH] feat: add names of response --- issue.go | 9 +++++---- jira.go | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/issue.go b/issue.go index 0aa03b70..49dab51c 100644 --- a/issue.go +++ b/issue.go @@ -530,10 +530,11 @@ type SearchOptions struct { // searchResult is only a small wrapper around the Search (with JQL) method // to be able to parse the results type searchResult struct { - Issues []Issue `json:"issues" structs:"issues"` - StartAt int `json:"startAt" structs:"startAt"` - MaxResults int `json:"maxResults" structs:"maxResults"` - Total int `json:"total" structs:"total"` + Issues []Issue `json:"issues" structs:"issues"` + StartAt int `json:"startAt" structs:"startAt"` + MaxResults int `json:"maxResults" structs:"maxResults"` + Total int `json:"total" structs:"total"` + Names map[string]string `json:"names" structs:"names"` } // GetQueryOptions specifies the optional parameters for the Get Issue methods diff --git a/jira.go b/jira.go index 25c52bae..9668617f 100644 --- a/jira.go +++ b/jira.go @@ -327,6 +327,7 @@ type Response struct { StartAt int MaxResults int Total int + Names map[string]string } func newResponse(r *http.Response, v interface{}) *Response { @@ -343,6 +344,7 @@ func (r *Response) populatePageValues(v interface{}) { r.StartAt = value.StartAt r.MaxResults = value.MaxResults r.Total = value.Total + r.Names = value.Names case *groupMembersResult: r.StartAt = value.StartAt r.MaxResults = value.MaxResults