Skip to content

Commit 6806ade

Browse files
authored
Update to delve 1.4.1 (#39)
1 parent 0596ba5 commit 6806ade

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

go/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM golang:1.14.1 as delve
1+
FROM golang:1.14.3 as delve
22

3-
RUN curl --location --output delve-1.4.0.tar.gz https://github.com/go-delve/delve/archive/v1.4.0.tar.gz \
4-
&& tar xzf delve-1.4.0.tar.gz \
5-
&& mv delve-1.4.0 delve-source
3+
ARG DELVE_VERSION=1.4.1
4+
5+
RUN curl --location --output delve-$DELVE_VERSION.tar.gz https://github.com/go-delve/delve/archive/v$DELVE_VERSION.tar.gz \
6+
&& tar xzf delve-$DELVE_VERSION.tar.gz \
7+
&& mv delve-$DELVE_VERSION delve-source
68

79
# Patch delve to change default for --only-same-user to false
810
# Required as `kubectl port-forward` to dlv port is refused.

go/delve-only-same-user.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ the outside of the pod, and so connecting to the dlv port is refused.
77
--- cmd/dlv/cmds/commands.go
88
+++ cmd/dlv/cmds/commands.go
99
@@ -114,7 +114,7 @@ func New(docCall bool) *cobra.Command {
10-
RootCommand.PersistentFlags().StringVar(&BuildFlags, "build-flags", buildFlagsDefault, "Build flags, to be passed to the compiler.")
11-
RootCommand.PersistentFlags().StringVar(&WorkingDir, "wd", ".", "Working directory for running the program.")
12-
RootCommand.PersistentFlags().BoolVarP(&CheckGoVersion, "check-go-version", "", true, "Checks that the version of Go in use is compatible with Delve.")
13-
- RootCommand.PersistentFlags().BoolVarP(&CheckLocalConnUser, "only-same-user", "", true, "Only connections from the same user that started this instance of Delve are allowed to connect.")
14-
+ RootCommand.PersistentFlags().BoolVarP(&CheckLocalConnUser, "only-same-user", "", false, "Only connections from the same user that started this instance of Delve are allowed to connect.")
15-
RootCommand.PersistentFlags().StringVar(&Backend, "backend", "default", `Backend selection (see 'dlv help backend').`)
16-
10+
rootCommand.PersistentFlags().StringVar(&buildFlags, "build-flags", buildFlagsDefault, "Build flags, to be passed to the compiler.")
11+
rootCommand.PersistentFlags().StringVar(&workingDir, "wd", ".", "Working directory for running the program.")
12+
rootCommand.PersistentFlags().BoolVarP(&checkGoVersion, "check-go-version", "", true, "Checks that the version of Go in use is compatible with Delve.")
13+
- rootCommand.PersistentFlags().BoolVarP(&checkLocalConnUser, "only-same-user", "", true, "Only connections from the same user that started this instance of Delve are allowed to connect.")
14+
+ rootCommand.PersistentFlags().BoolVarP(&checkLocalConnUser, "only-same-user", "", false, "Only connections from the same user that started this instance of Delve are allowed to connect.")
15+
rootCommand.PersistentFlags().StringVar(&backend, "backend", "default", `Backend selection (see 'dlv help backend').`)
16+
1717
// 'attach' subcommand.

0 commit comments

Comments
 (0)