@@ -44,9 +44,9 @@ $ jira api /rest/api/3/issue/PROJ-123 --translate-fields`
4444// NewCmdAPI is an api command.
4545func NewCmdAPI () * cobra.Command {
4646 cmd := cobra.Command {
47- Use : "api [endpoint]" ,
48- Short : "Make authenticated requests to the Jira API" ,
49- Long : helpText ,
47+ Use : "api [endpoint]" ,
48+ Short : "Make authenticated requests to the Jira API" ,
49+ Long : helpText ,
5050 Example : examples ,
5151 Annotations : map [string ]string {
5252 "cmd:main" : "true" ,
@@ -65,7 +65,7 @@ func NewCmdAPI() *cobra.Command {
6565 return & cmd
6666}
6767
68- // translateCustomFields replaces customfield_* IDs with their friendly names from config
68+ // translateCustomFields replaces customfield_* IDs with their friendly names from config.
6969func translateCustomFields (data []byte , debug bool ) []byte {
7070 // Get the custom fields from the config
7171 configuredFields , err := getCustomFieldsMapping ()
@@ -86,7 +86,7 @@ func translateCustomFields(data []byte, debug bool) []byte {
8686 }
8787
8888 // Try to detect any customfield_* patterns in the response that aren't in our config
89- var unrecognizedFields []string
89+ unrecognizedFields := make ( []string , 0 )
9090 re := regexp .MustCompile (`"(customfield_\d+)"` )
9191 matches := re .FindAllStringSubmatch (string (data ), - 1 )
9292
@@ -135,7 +135,7 @@ func translateCustomFields(data []byte, debug bool) []byte {
135135 return []byte (dataStr )
136136}
137137
138- // getCustomFieldsMapping returns a map of custom field IDs to their friendly names
138+ // getCustomFieldsMapping returns a map of custom field IDs to their friendly names.
139139func getCustomFieldsMapping () (map [string ]string , error ) {
140140 var configuredFields []jira.IssueTypeField
141141
0 commit comments