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
|
|
@ -60,7 +60,7 @@ func NewKsmdCollector() (Collector, error) {
|
|||
}
|
||||
|
||||
// Update implements Collector and exposes kernel and system statistics.
|
||||
func (c *ksmdCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
||||
func (c *ksmdCollector) Update(ch chan<- prometheus.Metric) error {
|
||||
for _, n := range ksmdFiles {
|
||||
val, err := readUintFromFile(sysFilePath(path.Join("kernel/mm/ksm", n)))
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue