url.JoinPath requires go 1.19. For now stay compatible with go 1.18

This commit is contained in:
Holger Obermaier 2022-08-15 15:25:59 +02:00
parent eaf8b1941d
commit f7b39d027b

View File

@ -5,7 +5,6 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"net/http" "net/http"
"net/url"
"strconv" "strconv"
"sync" "sync"
"time" "time"
@ -352,7 +351,8 @@ func (r *RedfishReceiver) Start() {
timestamp := time.Now() timestamp := time.Now()
URL, _ := url.JoinPath(processor.ODataID, "ProcessorMetrics") // Golang 1.19: URL, _ := url.JoinPath(processor.ODataID, "ProcessorMetrics")
URL := processor.ODataID + "/ProcessorMetrics"
resp, err := processor.Client.Get(URL) resp, err := processor.Client.Get(URL)
if err != nil { if err != nil {
// Skip non existing URLs // Skip non existing URLs