Skip to content

Commit 05df784

Browse files
committed
feat: integrate godump for enhanced debugging functionality
- Add `github.com/yassinebenaid/godump` dependency in `go.mod` - Import `github.com/yassinebenaid/godump` in `main.go` - Add debug dump functionality using `godump` in `run` function Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 928be3e commit 05df784

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require (
99
github.com/joho/godotenv v1.5.1
1010
github.com/stretchr/testify v1.8.4
1111
github.com/urfave/cli/v2 v2.27.6
12+
github.com/yassinebenaid/godump v0.11.1
1213
golang.org/x/crypto v0.37.0
1314
)
1415

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g=
2828
github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
2929
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
3030
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
31+
github.com/yassinebenaid/godump v0.11.1 h1:SPujx/XaYqGDfmNh7JI3dOyCUVrG0bG2duhO3Eh2EhI=
32+
github.com/yassinebenaid/godump v0.11.1/go.mod h1:dc/0w8wmg6kVIvNGAzbKH1Oa54dXQx8SNKh4dPRyW44=
3133
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
3234
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
3335
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/appleboy/easyssh-proxy"
1010
"github.com/joho/godotenv"
1111
"github.com/urfave/cli/v2"
12+
"github.com/yassinebenaid/godump"
1213
)
1314

1415
// Version set at compile-time
@@ -266,5 +267,9 @@ func run(c *cli.Context) error {
266267
},
267268
}
268269

270+
if plugin.Config.Debug {
271+
_ = godump.Dump(plugin)
272+
}
273+
269274
return plugin.Exec()
270275
}

0 commit comments

Comments
 (0)