From 5a77de005bc3fe7556e5e887d6bf5221ea8114b0 Mon Sep 17 00:00:00 2001
From: Ed Schouten <ed@kumina.nl>
Date: Tue, 20 Dec 2016 15:16:23 +0100
Subject: [PATCH] Fix style a bit.

---
 dovecot_exporter.go | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/dovecot_exporter.go b/dovecot_exporter.go
index 7f04c2a..75469c2 100644
--- a/dovecot_exporter.go
+++ b/dovecot_exporter.go
@@ -24,6 +24,7 @@ var (
 	dovecotScopes = [...]string{"user"}
 )
 
+// Converts the output of Dovecot's EXPORT command to metrics.
 func CollectFromReader(file io.Reader, ch chan<- prometheus.Metric) error {
 	scanner := bufio.NewScanner(file)
 	scanner.Split(bufio.ScanLines)
@@ -35,14 +36,11 @@ func CollectFromReader(file io.Reader, ch chan<- prometheus.Metric) error {
 	columnNames := strings.Fields(scanner.Text())
 	columns := []*prometheus.Desc{}
 	for _, columnName := range columnNames[1:] {
-		columns = append(
-			columns,
-			prometheus.NewDesc(
-				prometheus.BuildFQName("dovecot", columnNames[0], columnName),
-				"Help text not provided by this exporter.",
-				[]string{columnNames[0]},
-				nil,
-			))
+		columns = append(columns, prometheus.NewDesc(
+			prometheus.BuildFQName("dovecot", columnNames[0], columnName),
+			"Help text not provided by this exporter.",
+			[]string{columnNames[0]},
+			nil))
 	}
 
 	// Read successive lines, containing the values.
-- 
GitLab