Fix all open go lint and vet issues
This commit is contained in:
parent
5289ffb270
commit
c703435790
37 changed files with 136 additions and 129 deletions
|
|
@ -26,8 +26,8 @@ import (
|
|||
const (
|
||||
defIgnoredMountPoints = "^/(dev)($|/)"
|
||||
defIgnoredFSTypes = "^devfs$"
|
||||
MNT_RDONLY = 0x1
|
||||
MNT_NOWAIT = 0x2
|
||||
readOnly = 0x1 // MNT_RDONLY
|
||||
noWait = 0x2 // MNT_NOWAIT
|
||||
)
|
||||
|
||||
func gostring(b []int8) string {
|
||||
|
|
@ -43,7 +43,7 @@ func gostring(b []int8) string {
|
|||
func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
|
||||
buf := make([]unix.Statfs_t, 16)
|
||||
for {
|
||||
n, err := unix.Getfsstat(buf, MNT_NOWAIT)
|
||||
n, err := unix.Getfsstat(buf, noWait)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
|
|||
}
|
||||
|
||||
var ro float64
|
||||
if (fs.Flags & MNT_RDONLY) != 0 {
|
||||
if (fs.Flags & readOnly) != 0 {
|
||||
ro = 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue