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) }