summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2024-02-23 15:01:41 +0200
committerPaul Buetow <pbuetow@mimecast.com>2024-03-29 17:16:39 +0200
commit0f718c963e118139c893e9c52092e278bcd3b396 (patch)
treedce61c6695bc3badd455a64767252e6947b32711 /cmd
parent7a0b0cde9c7c46d5f70ebc4a9d4f4e718d835f70 (diff)
lint warnings
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dcat/main.go6
-rw-r--r--cmd/dgrep/main.go6
-rw-r--r--cmd/dmap/main.go6
-rw-r--r--cmd/dserver/main.go6
-rw-r--r--cmd/dtail/main.go6
-rw-r--r--cmd/dtailhealth/main.go6
6 files changed, 24 insertions, 12 deletions
diff --git a/cmd/dcat/main.go b/cmd/dcat/main.go
index 98da089..a50be51 100644
--- a/cmd/dcat/main.go
+++ b/cmd/dcat/main.go
@@ -59,8 +59,10 @@ func main() {
dlog.Start(ctx, &wg, source.Client)
if pprof != "" {
- go http.ListenAndServe(pprof, nil)
- dlog.Client.Info("Started PProf", pprof)
+ dlog.Client.Info("Starting PProf", pprof)
+ go func() {
+ panic(http.ListenAndServe(pprof, nil))
+ }()
}
client, err := clients.NewCatClient(args)
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go
index 7c3cc3e..19f818b 100644
--- a/cmd/dgrep/main.go
+++ b/cmd/dgrep/main.go
@@ -69,8 +69,10 @@ func main() {
}
if pprof != "" {
- go http.ListenAndServe(pprof, nil)
- dlog.Client.Info("Started PProf", pprof)
+ dlog.Client.Info("Starting PProf", pprof)
+ go func() {
+ panic(http.ListenAndServe(pprof, nil))
+ }()
}
client, err := clients.NewGrepClient(args)
diff --git a/cmd/dmap/main.go b/cmd/dmap/main.go
index e024b37..a8a52a2 100644
--- a/cmd/dmap/main.go
+++ b/cmd/dmap/main.go
@@ -64,8 +64,10 @@ func main() {
dlog.Start(ctx, &wg, source.Client)
if pprof != "" {
- go http.ListenAndServe(pprof, nil)
- dlog.Client.Info("Started PProf", pprof)
+ dlog.Client.Info("Starting PProf", pprof)
+ go func() {
+ panic(http.ListenAndServe(pprof, nil))
+ }()
}
client, err := clients.NewMaprClient(args, clients.DefaultMode)
diff --git a/cmd/dserver/main.go b/cmd/dserver/main.go
index 14188e1..3377273 100644
--- a/cmd/dserver/main.go
+++ b/cmd/dserver/main.go
@@ -71,8 +71,10 @@ func main() {
dlog.Start(ctx, &wg, source.Server)
if pprof != "" {
- dlog.Server.Info("Starting PProf", pprof)
- go http.ListenAndServe(pprof, nil)
+ dlog.Client.Info("Starting PProf", pprof)
+ go func() {
+ panic(http.ListenAndServe(pprof, nil))
+ }()
}
serv := server.New()
diff --git a/cmd/dtail/main.go b/cmd/dtail/main.go
index bd8eb87..e18923a 100644
--- a/cmd/dtail/main.go
+++ b/cmd/dtail/main.go
@@ -102,8 +102,10 @@ func main() {
}
if pprof != "" {
- go http.ListenAndServe(pprof, nil)
- dlog.Client.Info("Started PProf", pprof)
+ dlog.Client.Info("Starting PProf", pprof)
+ go func() {
+ panic(http.ListenAndServe(pprof, nil))
+ }()
}
var client clients.Client
diff --git a/cmd/dtailhealth/main.go b/cmd/dtailhealth/main.go
index 326c43a..a0ca84e 100644
--- a/cmd/dtailhealth/main.go
+++ b/cmd/dtailhealth/main.go
@@ -44,8 +44,10 @@ func main() {
dlog.Start(ctx, &wg, source.HealthCheck)
if pprof != "" {
- go http.ListenAndServe(pprof, nil)
- dlog.Client.Info("Started PProf", pprof)
+ dlog.Client.Info("Starting PProf", pprof)
+ go func() {
+ panic(http.ListenAndServe(pprof, nil))
+ }()
}
healthClient, _ := clients.NewHealthClient(args)