mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-03-17 20:47:57 +02:00
doc: Fix comments
This commit is contained in:
parent
fb1ce22699
commit
52e8877e24
9
field.go
9
field.go
@ -1,14 +1,13 @@
|
||||
package jira
|
||||
|
||||
// PriorityService handles priorities for the JIRA instance / API.
|
||||
// FieldService handles fields for the JIRA instance / API.
|
||||
//
|
||||
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-Priority
|
||||
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-Field
|
||||
type FieldService struct {
|
||||
client *Client
|
||||
}
|
||||
|
||||
// Priority represents a priority of a JIRA issue.
|
||||
// Typical types are "Normal", "Moderate", "Urgent", ...
|
||||
// Field represents a field of a JIRA issue.
|
||||
type Field struct {
|
||||
ID string `json:"id,omitempty" structs:"id,omitempty"`
|
||||
Key string `json:"key,omitempty" structs:"key,omitempty"`
|
||||
@ -27,7 +26,7 @@ type FieldSchema struct {
|
||||
|
||||
// GetList gets all fields from JIRA
|
||||
//
|
||||
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-priority-get
|
||||
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-field-get
|
||||
func (s *FieldService) GetList() ([]Field, *Response, error) {
|
||||
apiEndpoint := "rest/api/2/field"
|
||||
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
|
||||
|
@ -24,7 +24,7 @@ func TestFieldService_GetList(t *testing.T) {
|
||||
|
||||
fields, _, err := testClient.Field.GetList()
|
||||
if fields == nil {
|
||||
t.Error("Expected priority list. Priority list is nil")
|
||||
t.Error("Expected field list. Field list is nil")
|
||||
}
|
||||
if err != nil {
|
||||
t.Errorf("Error given: %s", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user