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
|
|
@ -31,12 +31,12 @@ const (
|
|||
)
|
||||
|
||||
// GetStats returns filesystem stats.
|
||||
func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
|
||||
func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
|
||||
mps, err := mountPointDetails()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
stats = []filesystemStats{}
|
||||
stats := []filesystemStats{}
|
||||
for _, labels := range mps {
|
||||
if c.ignoredMountPointsPattern.MatchString(labels.mountPoint) {
|
||||
log.Debugf("Ignoring mount point: %s", labels.mountPoint)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue