Skip to content

Commit 9c4fb6c

Browse files
committed
Improve logs
1 parent e56def9 commit 9c4fb6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

healthcheck/healthcheck.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
// Healthcheck allows to check status of the node
2020
type Healthcheck struct {
21-
url url.URL
21+
url string
2222
userAgent string
2323
}
2424

@@ -30,7 +30,7 @@ type Status struct {
3030
// Create a new Healthcheck
3131
func NewHealthcheck(url url.URL, userAgent string) *Healthcheck {
3232
return &Healthcheck{
33-
url: url,
33+
url: url.String(),
3434
userAgent: userAgent,
3535
}
3636
}
@@ -40,7 +40,7 @@ func (h *Healthcheck) Run(ctx context.Context) error {
4040
client := http.Client{
4141
Timeout: 100 * time.Millisecond,
4242
}
43-
req, err := http.NewRequestWithContext(ctx, http.MethodGet, h.url.String(), nil)
43+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, h.url, nil)
4444
if err != nil {
4545
logrus.WithError(err).Error("Error while creating http get request")
4646
return err

0 commit comments

Comments
 (0)