Skip to content

Commit

Permalink
reuse target variable
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Nath <[email protected]>
  • Loading branch information
electron0zero committed Nov 27, 2024
1 parent 9984371 commit 775603a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prober/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr

httpConfig := module.HTTP

targetLower := strings.ToLower(target)
if !strings.HasPrefix(targetLower, "http://") && !strings.HasPrefix(targetLower, "https://") {
target = strings.ToLower(target)
if !strings.HasPrefix(target, "http://") && !strings.HasPrefix(target, "https://") {
target = "http://" + target
}

Expand Down

0 comments on commit 775603a

Please sign in to comment.