Skip to content

Commit 469ab7c

Browse files
committed
Fix lint 1
1 parent 338a920 commit 469ab7c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/cmd/api/api.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ $ jira api /rest/api/3/issue/PROJ-123 --translate-fields`
4444
// NewCmdAPI is an api command.
4545
func 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.
6969
func 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.
139139
func getCustomFieldsMapping() (map[string]string, error) {
140140
var configuredFields []jira.IssueTypeField
141141

0 commit comments

Comments
 (0)