Skip to content

Commit

Permalink
all: update github.com/spf13/cobra to v1.1.3 (go-delve#2572)
Browse files Browse the repository at this point in the history
This removes indirect dependencies from go.mod, and
includes the fix for the missing -help flag info.

The latest cobra release is v1.2.1. Given that there were
minor security-related dependency cleanup during v1.2 release,
I was tempted to pick up the latest version, but that caused
dependency updates in golang.org/x/sys and golang.org/x/tools
which may be too recent (golang.org/x/* follow the go's release
support policy, so recent versions may not be compatible with
go versions beyond go's official version support policy).

Verified that dlv still builds with go1.12.x.
(go1.12 is the oldest version of go that can build the latest delve already).

$ go get -d github.com/spf13/[email protected]
$ go mod tidy
$ go mod vendor
$ go run _scripts/gen-usage-docs.go
  • Loading branch information
hyangah authored Jul 22, 2021
1 parent 8989073 commit f74b7a6
Show file tree
Hide file tree
Showing 117 changed files with 10,390 additions and 4,455 deletions.
3 changes: 2 additions & 1 deletion Documentation/usage/dlv.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Delve is a debugger for the Go programming language.

### Synopsis


Delve is a source level debugger for Go programs.

Delve enables you to interact with your program by controlling the execution of the process,
Expand All @@ -27,6 +26,7 @@ Pass flags to the program you are debugging using `--`, for example:
--check-go-version Checks that the version of Go in use is compatible with Delve. (default true)
--disable-aslr Disables address space randomization
--headless Run debug server only, in headless mode.
-h, --help help for dlv
--init string Init file, executed by the terminal client.
-l, --listen string Debugging server listen address. (default "127.0.0.1:0")
--log Enable debugging server logging.
Expand All @@ -38,6 +38,7 @@ Pass flags to the program you are debugging using `--`, for example:
```

### SEE ALSO

* [dlv attach](dlv_attach.md) - Attach to running process and begin debugging.
* [dlv connect](dlv_connect.md) - Connect to a headless debug server.
* [dlv core](dlv_core.md) - Examine a core dump.
Expand Down
5 changes: 3 additions & 2 deletions Documentation/usage/dlv_attach.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Attach to running process and begin debugging.

### Synopsis


Attach to an already running process and begin debugging it.

This command will cause Delve to take control of an already running process, and
Expand All @@ -13,13 +12,14 @@ option to let the process continue or kill it.


```
dlv attach pid [executable]
dlv attach pid [executable] [flags]
```

### Options

```
--continue Continue the debugged process on start.
-h, --help help for attach
```

### Options inherited from parent commands
Expand All @@ -44,5 +44,6 @@ dlv attach pid [executable]
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

8 changes: 7 additions & 1 deletion Documentation/usage/dlv_backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Help about the --backend flag.

### Synopsis


The --backend flag specifies which backend should be used, possible values
are:

Expand All @@ -15,6 +14,12 @@ are:



### Options

```
-h, --help help for backend
```

### Options inherited from parent commands

```
Expand All @@ -37,5 +42,6 @@ are:
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

10 changes: 8 additions & 2 deletions Documentation/usage/dlv_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ Connect to a headless debug server.

### Synopsis


Connect to a running headless debug server.

```
dlv connect addr
dlv connect addr [flags]
```

### Options

```
-h, --help help for connect
```

### Options inherited from parent commands
Expand All @@ -33,5 +38,6 @@ dlv connect addr
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

10 changes: 8 additions & 2 deletions Documentation/usage/dlv_core.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Examine a core dump.

### Synopsis


Examine a core dump (only supports linux and windows core dumps).

The core command will open the specified core file and the associated
Expand All @@ -14,7 +13,13 @@ core dump was taken.
Currently supports linux/amd64 and linux/arm64 core files, windows/amd64 minidumps and core files generated by Delve's 'dump' command.

```
dlv core <executable> <core>
dlv core <executable> <core> [flags]
```

### Options

```
-h, --help help for core
```

### Options inherited from parent commands
Expand All @@ -39,5 +44,6 @@ dlv core <executable> <core>
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

10 changes: 8 additions & 2 deletions Documentation/usage/dlv_dap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

### Synopsis


[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).

The server is always headless and requires a DAP client like vscode to connect and request a binary
Expand All @@ -20,7 +19,13 @@ While --continue is not supported, stopOnEntry launch/attach attribute can be us
execution is resumed at the start of the debug session.

```
dlv dap
dlv dap [flags]
```

### Options

```
-h, --help help for dap
```

### Options inherited from parent commands
Expand All @@ -45,5 +50,6 @@ dlv dap
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

5 changes: 3 additions & 2 deletions Documentation/usage/dlv_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Compile and begin debugging main package in current directory, or the package sp

### Synopsis


Compiles your program with optimizations disabled, starts and attaches to it.

By default, with no arguments, Delve will compile the 'main' package in the
Expand All @@ -13,13 +12,14 @@ package name and Delve will compile that package instead, and begin a new debug
session.

```
dlv debug [package]
dlv debug [package] [flags]
```

### Options

```
--continue Continue the debugged process on start.
-h, --help help for debug
--output string Output path for the binary. (default "./__debug_bin")
--tty string TTY to use for the target program
```
Expand All @@ -46,5 +46,6 @@ dlv debug [package]
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

5 changes: 3 additions & 2 deletions Documentation/usage/dlv_exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Execute a precompiled binary, and begin a debug session.

### Synopsis


Execute a precompiled binary and begin a debug session.

This command will cause Delve to exec the binary and immediately attach to it to
Expand All @@ -14,13 +13,14 @@ consider compiling debugging binaries with -gcflags="all=-N -l" on Go 1.10
or later, -gcflags="-N -l" on earlier versions of Go.

```
dlv exec <path/to/binary>
dlv exec <path/to/binary> [flags]
```

### Options

```
--continue Continue the debugged process on start.
-h, --help help for exec
--tty string TTY to use for the target program
```

Expand All @@ -46,5 +46,6 @@ dlv exec <path/to/binary>
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

8 changes: 7 additions & 1 deletion Documentation/usage/dlv_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Help about logging flags.

### Synopsis


Logging can be enabled by specifying the --log flag and using the
--log-output flag to select which components should produce logs.

Expand All @@ -30,6 +29,12 @@ and dap modes.



### Options

```
-h, --help help for log
```

### Options inherited from parent commands

```
Expand All @@ -52,5 +57,6 @@ and dap modes.
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

8 changes: 7 additions & 1 deletion Documentation/usage/dlv_redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Help about file redirection.

### Synopsis


The standard file descriptors of the target process can be controlled using the '-r' and '--tty' arguments.

The --tty argument allows redirecting all standard descriptors to a terminal, specified as an argument to --tty.
Expand All @@ -18,6 +17,12 @@ Where source is one of 'stdin', 'stdout' or 'stderr' and destination is the path
File redirects can also be changed using the 'restart' command.


### Options

```
-h, --help help for redirect
```

### Options inherited from parent commands

```
Expand All @@ -40,5 +45,6 @@ File redirects can also be changed using the 'restart' command.
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

10 changes: 8 additions & 2 deletions Documentation/usage/dlv_replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ Replays a rr trace.

### Synopsis


Replays a rr trace.

The replay command will open a trace generated by mozilla rr. Mozilla rr must be installed:
https://github.com/mozilla/rr


```
dlv replay [trace directory]
dlv replay [trace directory] [flags]
```

### Options

```
-h, --help help for replay
```

### Options inherited from parent commands
Expand All @@ -37,5 +42,6 @@ dlv replay [trace directory]
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

10 changes: 6 additions & 4 deletions Documentation/usage/dlv_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

Deprecated command. Use 'debug' instead.

### Synopsis
```
dlv run [flags]
```


Deprecated command. Use 'debug' instead.
### Options

```
dlv run
-h, --help help for run
```

### Options inherited from parent commands
Expand All @@ -33,5 +34,6 @@ dlv run
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

5 changes: 3 additions & 2 deletions Documentation/usage/dlv_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Compile test binary and begin debugging program.

### Synopsis


Compiles a test binary with optimizations disabled and begins a new debug session.

The test command allows you to begin a new debug session in the context of your
Expand All @@ -17,12 +16,13 @@ dlv test [package] -- -test.v -other-argument
See also: 'go help testflag'.

```
dlv test [package]
dlv test [package] [flags]
```

### Options

```
-h, --help help for test
--output string Output path for the binary. (default "debug.test")
```

Expand All @@ -48,5 +48,6 @@ dlv test [package]
```

### SEE ALSO

* [dlv](dlv.md) - Delve is a debugger for the Go programming language.

Loading

0 comments on commit f74b7a6

Please sign in to comment.