1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-07-13 01:00:23 +02:00

doc: Fix comments

This commit is contained in:
Thibaut Rousseau
2018-06-25 17:52:57 +02:00
parent fb1ce22699
commit 52e8877e24
2 changed files with 5 additions and 6 deletions

View File

@ -1,14 +1,13 @@
package jira 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 { type FieldService struct {
client *Client client *Client
} }
// Priority represents a priority of a JIRA issue. // Field represents a field of a JIRA issue.
// Typical types are "Normal", "Moderate", "Urgent", ...
type Field struct { type Field struct {
ID string `json:"id,omitempty" structs:"id,omitempty"` ID string `json:"id,omitempty" structs:"id,omitempty"`
Key string `json:"key,omitempty" structs:"key,omitempty"` Key string `json:"key,omitempty" structs:"key,omitempty"`
@ -27,7 +26,7 @@ type FieldSchema struct {
// GetList gets all fields from JIRA // 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) { func (s *FieldService) GetList() ([]Field, *Response, error) {
apiEndpoint := "rest/api/2/field" apiEndpoint := "rest/api/2/field"
req, err := s.client.NewRequest("GET", apiEndpoint, nil) req, err := s.client.NewRequest("GET", apiEndpoint, nil)

View File

@ -24,7 +24,7 @@ func TestFieldService_GetList(t *testing.T) {
fields, _, err := testClient.Field.GetList() fields, _, err := testClient.Field.GetList()
if fields == nil { if fields == nil {
t.Error("Expected priority list. Priority list is nil") t.Error("Expected field list. Field list is nil")
} }
if err != nil { if err != nil {
t.Errorf("Error given: %s", err) t.Errorf("Error given: %s", err)