From d249eea1e4010b6f39d619b0968c7aa651dbc9f3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 18 Feb 2024 12:57:28 +0000 Subject: add arch.go --- internal/arch.go | 14 ++++++++++++++ internal/ioriotng.go | 12 ------------ 2 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 internal/arch.go diff --git a/internal/arch.go b/internal/arch.go new file mode 100644 index 0000000..5424ea6 --- /dev/null +++ b/internal/arch.go @@ -0,0 +1,14 @@ +package internal + +import "runtime" + +func ksymArch() string { + switch runtime.GOARCH { + case "amd64": + return "x64" + case "arm64": + return "arm64" + default: + panic("unsupported architecture") + } +} diff --git a/internal/ioriotng.go b/internal/ioriotng.go index 9b2aeb7..2892431 100644 --- a/internal/ioriotng.go +++ b/internal/ioriotng.go @@ -6,7 +6,6 @@ import ( "bytes" "encoding/binary" "fmt" - "runtime" "ioriotng/internal/debugfs" "ioriotng/internal/flags" @@ -114,14 +113,3 @@ func readRaw[T any](raw []byte, ev *T) *T { } return ev } - -func ksymArch() string { - switch runtime.GOARCH { - case "amd64": - return "x64" - case "arm64": - return "arm64" - default: - panic("unsupported architecture") - } -} -- cgit v1.2.3