From 2624fb35d58382ace0c8ec44d897724d9f470229 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Fri, 19 Dec 2014 23:10:32 -0600 Subject: [PATCH] Use args passed in to cli Run --- client/cli/cli.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/cli/cli.go b/client/cli/cli.go index b66b62dc..4f9a3d8d 100644 --- a/client/cli/cli.go +++ b/client/cli/cli.go @@ -1,7 +1,6 @@ package cli import ( - "flag" "fmt" "io" "os" @@ -16,7 +15,7 @@ import ( const historyFile string = ".dbg_history" -func Run(run bool, pid int, args ...[]string) { +func Run(run bool, pid int, args []string) { var ( dbp *proctl.DebuggedProcess err error @@ -32,7 +31,7 @@ func Run(run bool, pid int, args ...[]string) { } defer os.Remove(debugname) - dbp, err = proctl.Launch(append([]string{"./" + debugname}, flag.Args()...)) + dbp, err = proctl.Launch(append([]string{"./" + debugname}, args...)) if err != nil { die(1, "Could not launch program:", err) } @@ -42,7 +41,7 @@ func Run(run bool, pid int, args ...[]string) { die(1, "Could not attach to process:", err) } default: - dbp, err = proctl.Launch(flag.Args()) + dbp, err = proctl.Launch(args) if err != nil { die(1, "Could not launch program:", err) }