Skip to content

Commit 9c13e5d

Browse files
committed
Remove un needed function from utils
1 parent 0915e09 commit 9c13e5d

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

blockdevice/stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ func (fs FS) SysBlockDeviceIOStat(device string) (IOStats, int, error) {
500500
"iodone_cnt": &ioDeviceStats.ioDoneCount,
501501
"ioerr_cnt": &ioDeviceStats.ioErrCount,
502502
} {
503-
val, err := util.ReadHexFromFile(fs.sys.Path(sysBlockPath, device, sysDevicePath, file))
503+
val, err := util.ReadUintFromFile(fs.sys.Path(sysBlockPath, device, sysDevicePath, file))
504504
if err != nil {
505505
return IODeviceStats{}, err
506506
}

internal/util/parse.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,6 @@ func ReadIntFromFile(path string) (int64, error) {
9797
return strconv.ParseInt(strings.TrimSpace(string(data)), 10, 64)
9898
}
9999

100-
// ReadHexFromFile reads a file and attempts to parse a hex from it.
101-
func ReadHexFromFile(path string) (int64, error) {
102-
data, err := os.ReadFile(path)
103-
if err != nil {
104-
return 0, err
105-
}
106-
return ParseHexUint64s(strings.TrimSpace(string(data)))
107-
}
108-
109100
// ParseBool parses a string into a boolean pointer.
110101
func ParseBool(b string) *bool {
111102
var truth bool

0 commit comments

Comments
 (0)