Remove more unnecessarily named return values

This commit is contained in:
Tobias Schmidt 2017-02-28 17:33:46 -04:00
commit 84eaa8fecd
4 changed files with 6 additions and 8 deletions

View file

@ -28,7 +28,7 @@ func init() {
Factories["exec"] = NewExecCollector
}
// NewExecCollector returns a new Collector exposing system execution statistics
// NewExecCollector returns a new Collector exposing system execution statistics.
func NewExecCollector() (Collector, error) {
// From sys/vm/vm_meter.c:
// All are of type CTLTYPE_UINT.
@ -77,15 +77,13 @@ func NewExecCollector() (Collector, error) {
}
// Update pushes exec statistics onto ch
func (c *execCollector) Update(ch chan<- prometheus.Metric) (err error) {
func (c *execCollector) Update(ch chan<- prometheus.Metric) error {
for _, m := range c.sysctls {
v, err := m.Value()
if err != nil {
return err
}
// We "know" all of our sysctls are CounterValues, let's skip
// parsing them
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName(Namespace, "exec", m.name),