Skip to content

Commit 54ff2a7

Browse files
committed
correct code style
Signed-off-by: MytkoEnko <deass@ukr.net>
1 parent 8571119 commit 54ff2a7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/notify/notify.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ func (r *Receiver) Notify(data *alertmanager.Data, hashJiraLabel bool, updateSum
119119
}
120120
}
121121

122-
123122
for CustomField := range issueCustomFields {
124123
if _, ok := issue.Fields.Unknowns[CustomField]; ok {
125124
if issue.Fields.Unknowns[CustomField] != issueCustomFields[CustomField] {
@@ -315,7 +314,7 @@ func toGroupTicketLabel(groupLabels alertmanager.KV, hashJiraLabel bool) string
315314
func (r *Receiver) search(project, issueLabel string) (*jira.Issue, bool, error) {
316315
query := fmt.Sprintf("project=\"%s\" and labels=%q order by resolutiondate desc", project, issueLabel)
317316
options := &jira.SearchOptions{
318-
Fields: append([]string{"summary", "status", "resolution", "resolutiondate"}, r.conf.CustomFieldsToUpdate...),
317+
Fields: append([]string{"summary", "status", "resolution", "resolutiondate"}, r.conf.CustomFieldsToUpdate...),
319318
MaxResults: 2,
320319
}
321320

pkg/notify/notify_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ func testReceiverConfig2() *config.ReceiverConfig {
180180
}
181181
}
182182

183-
184183
func testReceiverConfigAutoResolve() *config.ReceiverConfig {
185184
reopen := config.Duration(1 * time.Hour)
186185
autoResolve := config.AutoResolve{State: "Done"}
@@ -217,7 +216,7 @@ func testReceiverConfigWithCustomFields() *config.ReceiverConfig {
217216
Fields: tcontainer.MarshalMap(map[string]interface{}{
218217
"customfield_12345": `{{ (index .Alerts 0).Annotations.AlertValue }}`,
219218
}),
220-
CustomFieldsToUpdate: []string{"customfield_12345","non_existant_field"},
219+
CustomFieldsToUpdate: []string{"customfield_12345", "non_existant_field"},
221220
}
222221
}
223222

0 commit comments

Comments
 (0)