diff options
| author | Paul Buetow <paul@buetow.org> | 2024-02-18 12:57:28 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-02-18 12:57:28 +0000 |
| commit | d249eea1e4010b6f39d619b0968c7aa651dbc9f3 (patch) | |
| tree | 0ad06bdb8503058b2fc10f7df57864ae75397492 | |
| parent | cf95f467a7b382d932c85b516e1b9aae6b73d7f5 (diff) | |
add arch.go
| -rw-r--r-- | internal/arch.go | 14 | ||||
| -rw-r--r-- | internal/ioriotng.go | 12 |
2 files changed, 14 insertions, 12 deletions
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") - } -} |
