From 96602050fd526d33912db8983885a9a6360531d1 Mon Sep 17 00:00:00 2001 From: Selyss <99344963+Selyss@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:07:16 -0500 Subject: [PATCH] add: test --- cmd/main.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 4e731d0..bd8c72a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -35,15 +35,25 @@ func parseArgs() *assembuddy.CLIOptions { func main() { opts := parseArgs() + if opts.ListArch { - _, err := assembuddy.ArchInfo() - if err != nil { - log.Fatalf("Error: %s", err) - } + listArch() + } else { + syscallData(opts) } +} + +func listArch() { + _, err := assembuddy.ArchInfo() + if err != nil { + log.Fatalf("Error: %v", err) + } +} + +func syscallData(opts *assembuddy.CLIOptions) { table, err := assembuddy.GetSyscallData(opts) if err != nil { - log.Fatal(err) + log.Fatalf("Error: %v", err) } assembuddy.RenderTable(opts, table) }