From 76f8dd448baf910ddcccab643ecc316fbedba5a8 Mon Sep 17 00:00:00 2001 From: Mario Trangoni Date: Tue, 4 Dec 2018 16:50:01 +0100 Subject: [PATCH] postfix_exporter.go: Comment out unused `CollectShowqFromFile` function See, $ gometalinter --vendor ./... postfix_exporter.go:256:1:warning: CollectShowqFromFile is unused (deadcode) --- postfix_exporter.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/postfix_exporter.go b/postfix_exporter.go index 78f8d28..795c5d9 100644 --- a/postfix_exporter.go +++ b/postfix_exporter.go @@ -252,14 +252,14 @@ func CollectBinaryShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) e } // CollectShowqFromFile collects Postfix queue statistics from a file. -func CollectShowqFromFile(path string, ch chan<- prometheus.Metric) error { - fd, err := os.Open(path) - if err != nil { - return err - } - defer fd.Close() - return CollectShowqFromReader(fd, ch) -} +//func CollectShowqFromFile(path string, ch chan<- prometheus.Metric) error { +// fd, err := os.Open(path) +// if err != nil { +// return err +// } +// defer fd.Close() +// return CollectShowqFromReader(fd, ch) +//} // CollectShowqFromSocket collects Postfix queue statistics from a socket. func CollectShowqFromSocket(path string, ch chan<- prometheus.Metric) error {