diff --git a/api/filter-alerts.go b/api/filter-alerts.go index 6e80ed3..3a45f3e 100644 --- a/api/filter-alerts.go +++ b/api/filter-alerts.go @@ -159,7 +159,7 @@ func (fa *FilterAlerts) Delete(viewName, filterAlertID string) error { err := fa.client.Mutate(&mutation, variables) - if mutation.DidDelete == false { + if !mutation.DidDelete { return fmt.Errorf("unable to remove filter alert in repo/view '%s' with id '%s'", viewName, filterAlertID) } diff --git a/cmd/humioctl/filter_alerts_list.go b/cmd/humioctl/filter_alerts_list.go index 4a70b23..d5b6712 100644 --- a/cmd/humioctl/filter_alerts_list.go +++ b/cmd/humioctl/filter_alerts_list.go @@ -36,18 +36,12 @@ func newFilterAlertsListCmd() *cobra.Command { var rows = make([][]format.Value, len(filterAlerts)) for i := range filterAlerts { filterAlert := filterAlerts[i] - - var actionNames = make([]string, len(filterAlert.ActionNames)) - for j := range filterAlert.ActionNames { - actionNames[j] = filterAlert.ActionNames[j] - } - rows[i] = []format.Value{ format.String(filterAlert.ID), format.String(filterAlert.Name), format.Bool(filterAlert.Enabled), format.String(filterAlert.Description), - format.String(strings.Join(actionNames, ", ")), + format.String(strings.Join(filterAlert.ActionNames, ", ")), format.String(strings.Join(filterAlert.Labels, ", ")), format.String(filterAlert.RunAsUserID), format.String(filterAlert.QueryOwnershipType),