Skip to content
Snippets Groups Projects
Commit da3c5ac3 authored by cellscape's avatar cellscape Committed by ale
Browse files

Exit on stdin EOF

parent 2035b9ee
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@ package main
import (
"bufio"
"os"
"strings"
"sync"
"github.com/prometheus/client_golang/prometheus"
......@@ -116,9 +115,7 @@ func (re *rsyslogExporter) Collect(ch chan<- prometheus.Metric) {
func (re *rsyslogExporter) run() {
for re.scanner.Scan() {
if strings.Contains(re.scanner.Text(), "EOF") {
os.Exit(0)
}
re.handleStatLine(re.scanner.Bytes())
}
os.Exit(0)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment