File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed
Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ import (
1616func main () {
1717 args := os .Args
1818
19- // enable debug except for command version and bootstrap-state which rely on command output. Debugging server will
20- // mess up with those commands.
19+ // enable debug except for command ` version` and ` bootstrap-state` which rely on command output. Debugging server
20+ // will mess up with those commands.
2121 if slices .Contains (args , "version" ) || slices .Contains (args , "bootstrap-state" ) {
2222 os .Exit (Main (args ))
2323 }
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ import (
1616func main () {
1717 args := os .Args
1818
19- // enable debug except for command version and bootstrap-state which rely on command output. Debugging server will
20- // mess up with those commands.
19+ // enable debug except for command ` version` and ` bootstrap-state` which rely on command output. Debugging server
20+ // will mess up with those commands.
2121 if slices .Contains (args , "version" ) || slices .Contains (args , "bootstrap-state" ) {
2222 os .Exit (Main (args ))
2323 }
Original file line number Diff line number Diff line change @@ -23,11 +23,9 @@ const (
2323//
2424// It works in two phases:
2525// At first call, it launches the delve command `exec` with the current binary. However, before the
26- // call it set a environment variable DELVE_ANYTHING_NO_DEBUG.
27- // At the second call, DELVE_ANYTHING_NO_DEBUG is set, so it just return the "normal" main.
26+ // call it sets an environment variable DELVE_ANYTHING_NO_DEBUG.
27+ // At the second call, DELVE_ANYTHING_NO_DEBUG is set, so it just returns the "normal" main.
2828func NewDlvRunner (opts ... Option ) func (main MainWithArgs ) MainWithArgs {
29-
30- // Apply configuration option.
3129 config := Config {}
3230 config .apply (opts ... )
3331
Original file line number Diff line number Diff line change 1919// go build -gcflags "all=-N -l" -tags debug path/to/my/package
2020//
2121// It can be done through having two main files in package main, one named `main.go` and one name `main_debug.go`. The
22- // former will be compiled only if there is no debug tag, the former only if there is a debug tag. Making mistake with
23- // tags would end up with two main function , which will cause a compile error (better for avoiding to ship debug binaries
24- // in production.
22+ // former will be compiled only if there is no debug tag, the latter only if there is a debug tag. Making mistake with
23+ // tags would end up with two main functions , which will cause a compile error (better for avoiding shipment of debug
24+ // binaries in production) .
2525//
2626// # Example
2727//
You can’t perform that action at this time.
0 commit comments