From 37280079ac297667fee77e368082abbe6a38af3e Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 27 Apr 2022 13:48:20 +0300 Subject: [PATCH] Fix returning apps when no host found, fixes #1427 --- pkg/zabbix/methods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/zabbix/methods.go b/pkg/zabbix/methods.go index 4c40e8e..26ec432 100644 --- a/pkg/zabbix/methods.go +++ b/pkg/zabbix/methods.go @@ -181,7 +181,7 @@ func (ds *Zabbix) GetApps(ctx context.Context, groupFilter string, hostFilter st if err != nil { return nil, err } - var hostids []string + hostids := make([]string, 0) for _, host := range hosts { hostids = append(hostids, host.ID) }