From ec927b42c365b8413f6682b1d14f37cd20e16982 Mon Sep 17 00:00:00 2001 From: Selyss <99344963+Selyss@users.noreply.github.com> Date: Mon, 27 Nov 2023 21:59:47 -0500 Subject: [PATCH] removed listarch --- cmd/main.go | 18 ++---------------- pkg/assembuddy/requestTable.go | 4 ---- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 76d4baa..732f37b 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -16,18 +16,15 @@ func parseArgs() *assembuddy.CLIOptions { query := parser.String("q", "query", &argparse.Options{Help: "Search query"}) arch := parser.String("a", "architecture", &argparse.Options{Help: "Architecture for queries"}) - listArch := parser.Flag("r", "list-arch", &argparse.Options{Help: "Get all supported architecture convensions"}) - prettyPrint := parser.Flag("p", "pretty-print", &argparse.Options{Help: "Pretty print JSON result"}) err := parser.Parse(os.Args) - if err != nil || (*query == "" && *arch == "") && !*listArch { + if err != nil || (*query == "" && *arch == "") { fmt.Print(parser.Usage(err)) os.Exit(1) } opts.Syscall = *query opts.Arch = *arch - opts.ListArch = *listArch opts.PrettyPrint = *prettyPrint return opts @@ -36,18 +33,7 @@ func parseArgs() *assembuddy.CLIOptions { func main() { opts := parseArgs() - if opts.ListArch { - listArch() - } else { - syscallData(opts) - } -} - -func listArch() { - _, err := assembuddy.ArchInfo() - if err != nil { - log.Fatalf("Error: %v", err) - } + syscallData(opts) } func syscallData(opts *assembuddy.CLIOptions) { diff --git a/pkg/assembuddy/requestTable.go b/pkg/assembuddy/requestTable.go index ba2487b..f1de76d 100644 --- a/pkg/assembuddy/requestTable.go +++ b/pkg/assembuddy/requestTable.go @@ -86,7 +86,3 @@ func GetSyscallData(opts *CLIOptions) (string, error) { } return url, nil } - -func ArchInfo() ([]Syscall, error) { - return FetchData(conventionEndpoint) -}