From 0e1540a1c110830209941aa534a7c03effc4cd10 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Thu, 10 Jan 2019 11:39:37 +0100 Subject: [PATCH] Fix asset registry slice generation (#9986) As found in https://github.com/elastic/beats/pull/9703/files#r246286729 the wrong variable was used for the length check. --- libbeat/asset/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbeat/asset/registry.go b/libbeat/asset/registry.go index 60c68e97c57..ce7dbd28bdd 100644 --- a/libbeat/asset/registry.go +++ b/libbeat/asset/registry.go @@ -56,7 +56,7 @@ func GetFields(beat string) ([]byte, error) { // Get all priorities and sort them beatRegistry := FieldsRegistry[beat] - priorities := make([]int, 0, len(FieldsRegistry)) + priorities := make([]int, 0, len(beatRegistry)) for p := range beatRegistry { priorities = append(priorities, p) }