From 4109a5089fad4d0c967992da7340a44618a45853 Mon Sep 17 00:00:00 2001 From: Hu Shuai Date: Mon, 8 Feb 2021 10:53:12 +0800 Subject: [PATCH] Fix ineffassign issue Signed-off-by: Hu Shuai --- collector/zfs_solaris.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/collector/zfs_solaris.go b/collector/zfs_solaris.go index 1c0460c1..c9877875 100644 --- a/collector/zfs_solaris.go +++ b/collector/zfs_solaris.go @@ -299,6 +299,9 @@ func (c *zfsCollector) updateZfsFetchStats(ch chan<- prometheus.Metric) error { defer tok.Close() ksZFSInfo, err := tok.Lookup("zfs", 0, "zfetchstats") + if err != nil { + return err + } for k, v := range map[string]*prometheus.Desc{ "hits": c.zfetchstatsHits,