Skip to content

Commit 0a0b483

Browse files
committed
Fixed golint warnings
1 parent 1d30ab3 commit 0a0b483

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

platform/os_linux.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ import (
1010
)
1111

1212
const (
13-
// Filesystem paths.
13+
// RuntimePath is the path where runtime files are stored.
1414
RuntimePath = "/var/run/"
15-
LogPath = "/var/log/"
15+
16+
// LogPath is the path where log files are stored.
17+
LogPath = "/var/log/"
1618
)
1719

1820
// GetOSInfo returns OS version information.
1921
func GetOSInfo() string {
2022
info, err := ioutil.ReadFile("/proc/version")
21-
if err == nil {
22-
return string(info)
23-
} else {
23+
if err != nil {
2424
return "unknown"
2525
}
26+
27+
return string(info)
2628
}
2729

2830
// GetLastRebootTime returns the last time the system rebooted.

platform/os_windows.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import (
88
)
99

1010
const (
11-
// Filesystem paths.
11+
// RuntimePath is the path where runtime files are stored.
1212
RuntimePath = ""
13-
LogPath = ""
13+
14+
// LogPath is the path where log files are stored.
15+
LogPath = ""
1416
)
1517

1618
// GetOSInfo returns OS version information.

0 commit comments

Comments
 (0)