From b2dfaeb14633af8e8a1bfb8a63fe1767803e829c Mon Sep 17 00:00:00 2001 From: Daniel Swarbrick Date: Sun, 12 May 2024 18:27:58 +0200 Subject: [PATCH] zfs: make zfsPoolStatesName an array Code does not modify zfsPoolStatesName slice, so make it an array. Signed-off-by: Daniel Swarbrick --- collector/zfs_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/zfs_linux.go b/collector/zfs_linux.go index c1ce284b..e0d9c3f6 100644 --- a/collector/zfs_linux.go +++ b/collector/zfs_linux.go @@ -46,7 +46,7 @@ const ( var ( errZFSNotAvailable = errors.New("ZFS / ZFS statistics are not available") - zfsPoolStatesName = []string{"online", "degraded", "faulted", "offline", "removed", "unavail", "suspended"} + zfsPoolStatesName = [...]string{"online", "degraded", "faulted", "offline", "removed", "unavail", "suspended"} ) type zfsCollector struct {