From af0e0286a61fd0a9a820e68536925fc054bde34a Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Mon, 10 Nov 2014 17:12:46 -0600 Subject: [PATCH] Move main package to cmd for 'dlv' binary name --- README.md | 10 +++++++--- main.go => cmd/dlv/main.go | 4 ++-- main_test.go => cmd/dlv/main_test.go | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) rename main.go => cmd/dlv/main.go (98%) rename main_test.go => cmd/dlv/main_test.go (96%) diff --git a/README.md b/README.md index e8008d43..e9f28528 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Delve is a Go debugger, written in Go. Currently, Delve requires the following [patch](https://codereview.appspot.com/117280043/), however this change is vendored until Go 1.4 lands, so the project is go get-able. +``` +go get github.com/derekparker/delve/cmd/dlv +``` + ### Features * Attach to an already running process @@ -21,19 +25,19 @@ The debugger can be launched in three ways: * Compile, run, and attach in one step: ``` - $ delve -run + $ dlv -run ``` * Provide the name of the program you want to debug, and the debugger will launch it for you. ``` - $ delve -proc path/to/program + $ dlv -proc path/to/program ``` * Provide the pid of a currently running process, and the debugger will attach and begin the session. ``` - $ sudo delve -pid 44839 + $ sudo dlv -pid 44839 ``` ### Breakpoints diff --git a/main.go b/cmd/dlv/main.go similarity index 98% rename from main.go rename to cmd/dlv/main.go index 8af3ec53..11a24a54 100644 --- a/main.go +++ b/cmd/dlv/main.go @@ -16,7 +16,7 @@ import ( "github.com/derekparker/delve/proctl" ) -const version string = "0.1.1.beta" +const version string = "0.1.2.beta" type term struct { stdin *bufio.Reader @@ -163,7 +163,7 @@ func parseCommand(cmdstr string) (string, []string) { } func (t *term) promptForInput() (string, error) { - prompt := "delve> " + prompt := "dlv> " line := *goreadline.ReadLine(&prompt) line = strings.TrimSuffix(line, "\n") if line != "" { diff --git a/main_test.go b/cmd/dlv/main_test.go similarity index 96% rename from main_test.go rename to cmd/dlv/main_test.go index 8154daaa..1aa8b5ec 100644 --- a/main_test.go +++ b/cmd/dlv/main_test.go @@ -55,7 +55,7 @@ func TestCleanExit(t *testing.T) { var ( waitchan = make(chan *os.ProcessState) - testprog = startTestProg(t, "_fixtures/livetestprog") + testprog = startTestProg(t, "../../_fixtures/livetestprog") ) go func() { -- GitLab