From b8aca7463e43ad3c19108adaf9b6bc27804cbc81 Mon Sep 17 00:00:00 2001 From: binjip978 Date: Sun, 17 May 2020 15:37:53 +0300 Subject: [PATCH] fix typo in util.ReadIntFromFile Signed-off-by: binjip978 --- internal/util/parse.go | 2 +- sysfs/class_thermal.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/util/parse.go b/internal/util/parse.go index 3f1b174a0..22cb07a6b 100644 --- a/internal/util/parse.go +++ b/internal/util/parse.go @@ -74,7 +74,7 @@ func ReadUintFromFile(path string) (uint64, error) { } // ReadIntFromFile reads a file and attempts to parse a int64 from it. -func ReadIntFromFromFile(path string) (int64, error) { +func ReadIntFromFile(path string) (int64, error) { data, err := ioutil.ReadFile(path) if err != nil { return 0, err diff --git a/sysfs/class_thermal.go b/sysfs/class_thermal.go index c20639f20..457c6bda2 100644 --- a/sysfs/class_thermal.go +++ b/sysfs/class_thermal.go @@ -67,7 +67,7 @@ func parseClassThermalZone(zone string) (ClassThermalZoneStats, error) { if err != nil { return ClassThermalZoneStats{}, err } - zoneTemp, err := util.ReadIntFromFromFile(filepath.Join(zone, "temp")) + zoneTemp, err := util.ReadIntFromFile(filepath.Join(zone, "temp")) if err != nil { return ClassThermalZoneStats{}, err }