Remove unnecessarily named return variables
Named return variables should only be used to describe the returned type further, e.g. `err error` doesn't add any new information and is just stutter.
This commit is contained in:
parent
084e585c2a
commit
922e74d58f
32 changed files with 54 additions and 56 deletions
|
|
@ -107,7 +107,7 @@ func NewStatCollector() (Collector, error) {
|
|||
}
|
||||
|
||||
// Expose CPU stats using sysctl.
|
||||
func (c *statCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
||||
func (c *statCollector) Update(ch chan<- prometheus.Metric) error {
|
||||
// We want time spent per-cpu per CPUSTATE.
|
||||
// CPUSTATES (number of CPUSTATES) is defined as 5U.
|
||||
// Order: CP_USER | CP_NICE | CP_SYS | CP_IDLE | CP_INTR
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue