about summary refs log tree commit diff
path: root/packages/numap/internal/sysfs/parse.go
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-03-10 09:35:50 -0700
committerFranck Cuny <franck@fcuny.net>2024-03-10 09:35:50 -0700
commit3218a873291aa202dc66e3124e3b13e3d7f41966 (patch)
treeb981d59661b6813cc719298fcb8ae91d99319f5f /packages/numap/internal/sysfs/parse.go
parentinstall the zed editor (diff)
downloadworld-3218a873291aa202dc66e3124e3b13e3d7f41966.tar.gz
delete a bunch of stuff
Diffstat (limited to 'packages/numap/internal/sysfs/parse.go')
-rw-r--r--packages/numap/internal/sysfs/parse.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/packages/numap/internal/sysfs/parse.go b/packages/numap/internal/sysfs/parse.go
deleted file mode 100644
index d518653..0000000
--- a/packages/numap/internal/sysfs/parse.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package sysfs
-
-import (
-	"io/ioutil"
-	"strconv"
-	"strings"
-)
-
-// ContentUint64 parses the content of a file in sysfs, and convert
-// from hex to uint64.
-func ContentUint64(path string) (uint64, error) {
-	content, err := ioutil.ReadFile(path)
-	if err != nil {
-		return 0, err
-	}
-	result, err := strconv.ParseUint(strings.TrimSpace(string(content)), 0, 64)
-	if err != nil {
-		return 0, err
-	}
-	return result, nil
-}