systemd: Remove unneeded/unhandled error returns (#1035)

Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
Julius Volz 2018-08-05 16:55:25 +02:00 committed by GitHub
parent 6bdc5558ec
commit 2c52b8c761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -148,7 +148,7 @@ func (c *systemdCollector) collectUnitStatusMetrics(ch chan<- prometheus.Metric,
} }
} }
func (c *systemdCollector) collectSockets(ch chan<- prometheus.Metric, units []unit) error { func (c *systemdCollector) collectSockets(ch chan<- prometheus.Metric, units []unit) {
for _, unit := range units { for _, unit := range units {
if !strings.HasSuffix(unit.Name, ".socket") { if !strings.HasSuffix(unit.Name, ".socket") {
continue continue
@ -164,7 +164,6 @@ func (c *systemdCollector) collectSockets(ch chan<- prometheus.Metric, units []u
c.socketRefusedConnectionsDesc, prometheus.GaugeValue, c.socketRefusedConnectionsDesc, prometheus.GaugeValue,
float64(unit.refusedConnections), unit.Name) float64(unit.refusedConnections), unit.Name)
} }
return nil
} }
func (c *systemdCollector) collectUnitStartTimeMetrics(ch chan<- prometheus.Metric, units []unit) { func (c *systemdCollector) collectUnitStartTimeMetrics(ch chan<- prometheus.Metric, units []unit) {
@ -175,7 +174,7 @@ func (c *systemdCollector) collectUnitStartTimeMetrics(ch chan<- prometheus.Metr
} }
} }
func (c *systemdCollector) collectTimers(ch chan<- prometheus.Metric, units []unit) error { func (c *systemdCollector) collectTimers(ch chan<- prometheus.Metric, units []unit) {
for _, unit := range units { for _, unit := range units {
if !strings.HasSuffix(unit.Name, ".timer") { if !strings.HasSuffix(unit.Name, ".timer") {
continue continue
@ -185,7 +184,6 @@ func (c *systemdCollector) collectTimers(ch chan<- prometheus.Metric, units []un
c.timerLastTriggerDesc, prometheus.GaugeValue, c.timerLastTriggerDesc, prometheus.GaugeValue,
float64(unit.lastTriggerUsec)/1e6, unit.Name) float64(unit.lastTriggerUsec)/1e6, unit.Name)
} }
return nil
} }
func (c *systemdCollector) collectSummaryMetrics(ch chan<- prometheus.Metric, summary map[string]float64) { func (c *systemdCollector) collectSummaryMetrics(ch chan<- prometheus.Metric, summary map[string]float64) {