Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed Apr 22, 2024
1 parent 139aca4 commit c536833
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 20 deletions.
16 changes: 9 additions & 7 deletions disk/disk_aix_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ import (

var startBlank = regexp.MustCompile(`^\s+`)

var ignoreFSType = map[string]bool{"procfs": true}
var FSType = map[int]string{
0: "jfs2", 1: "namefs", 2: "nfs", 3: "jfs", 5: "cdrom", 6: "proc",
16: "special-fs", 17: "cache-fs", 18: "nfs3", 19: "automount-fs", 20: "pool-fs", 32: "vxfs",
33: "veritas-fs", 34: "udfs", 35: "nfs4", 36: "nfs4-pseudo", 37: "smbfs", 38: "mcr-pseudofs",
39: "ahafs", 40: "sterm-nfs", 41: "asmfs",
}
var (
ignoreFSType = map[string]bool{"procfs": true}
FSType = map[int]string{
0: "jfs2", 1: "namefs", 2: "nfs", 3: "jfs", 5: "cdrom", 6: "proc",
16: "special-fs", 17: "cache-fs", 18: "nfs3", 19: "automount-fs", 20: "pool-fs", 32: "vxfs",
33: "veritas-fs", 34: "udfs", 35: "nfs4", 36: "nfs4-pseudo", 37: "smbfs", 38: "mcr-pseudofs",
39: "ahafs", 40: "sterm-nfs", 41: "asmfs",
}
)

func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, error) {
var ret []PartitionStat
Expand Down
6 changes: 4 additions & 2 deletions disk/disk_openbsd_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions disk/disk_openbsd_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions disk/disk_openbsd_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions disk/disk_openbsd_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions disk/disk_openbsd_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion load/load_aix_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func AvgWithContext(ctx context.Context) (*AvgStat, error) {
}
ret := &AvgStat{}

p := separator.Split(string(line[idx:len(line)]), 5)
p := separator.Split(string(line[idx:]), 5)
if 4 < len(p) && p[0] == "load" && p[1] == "average:" {
if t, err := strconv.ParseFloat(p[2], 64); err == nil {
ret.Load1 = t
Expand Down
3 changes: 2 additions & 1 deletion net/net_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
var portMatch = regexp.MustCompile(`(.*)\.(\d+)$`)

func ParseNetstat(output string, mode string,
iocs map[string]IOCountersStat) error {
iocs map[string]IOCountersStat,
) error {
lines := strings.Split(output, "\n")

exists := make([]string, 0, len(lines)-1)
Expand Down
1 change: 0 additions & 1 deletion sensors/sensors_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ func getTemperatureFiles(ctx context.Context) ([]string, error) {
}

return files, nil

}

func optionalValueReadFromFile(filename string) float64 {
Expand Down

0 comments on commit c536833

Please sign in to comment.