Skip to content

Commit 342195c

Browse files
committed
removing logged errors & minor review suggestions
1 parent 45ffb6d commit 342195c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: pkg/gofr/gofr.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (a *App) Run() {
240240
}
241241

242242
func (a *App) hasTelemetry() bool {
243-
return a.Config.GetOrDefault("GOFR_TELEMETRY", "true") == defaultTelemetry
243+
return a.Config.GetOrDefault("GOFR_TELEMETRY", defaultTelemetry) == "true"
244244
}
245245

246246
func (a *App) sendTelemetry(client *http.Client, s string) {
@@ -264,14 +264,10 @@ func (a *App) sendTelemetry(client *http.Client, s string) {
264264

265265
resp, err := client.Do(req)
266266
if err != nil {
267-
a.container.Errorf("Failed to send telemetry: %v", err)
268267
return
269268
}
270269

271-
err = resp.Body.Close()
272-
if err != nil {
273-
a.container.Errorf("Failed to close telemetry response: %v", err)
274-
}
270+
resp.Body.Close()
275271
}
276272

277273
// Shutdown stops the service(s) and close the application.

0 commit comments

Comments
 (0)