Skip to content

Commit

Permalink
add: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Selyss committed Nov 22, 2023
1 parent 3dd3b2d commit 9660205
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 9660205

Please sign in to comment.