mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-06-23 00:07:40 +02:00
using native time.Time
This commit is contained in:
9
issue.go
9
issue.go
@ -185,16 +185,16 @@ type Worklog struct {
|
|||||||
Author *Assignee `json:"author"`
|
Author *Assignee `json:"author"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type JiraTime struct {
|
type JiraTime time.Time
|
||||||
Time time.Time
|
|
||||||
}
|
type CustomFields map[string]string
|
||||||
|
|
||||||
func (t *JiraTime) UnmarshalJSON(b []byte) error {
|
func (t *JiraTime) UnmarshalJSON(b []byte) error {
|
||||||
ti, err := time.Parse("\"2006-01-02T15:04:05.999-0700\"", string(b))
|
ti, err := time.Parse("\"2006-01-02T15:04:05.999-0700\"", string(b))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
*t = JiraTime{ti}
|
*t = JiraTime(ti)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,7 +275,6 @@ func (s *IssueService) Get(issueID string) (*Issue, *http.Response, error) {
|
|||||||
return issue, resp, nil
|
return issue, resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type CustomFields map[string]string
|
|
||||||
|
|
||||||
// Returns a map of customfield_* keys with string values
|
// Returns a map of customfield_* keys with string values
|
||||||
func (s *IssueService) GetCustomFields(issueID string) (CustomFields, *http.Response, error) {
|
func (s *IssueService) GetCustomFields(issueID string) (CustomFields, *http.Response, error) {
|
||||||
|
Reference in New Issue
Block a user