fix defer temp
All checks were successful
Build and Push BuildUp / build (push) Successful in 1m33s

This commit is contained in:
MatBureau
2026-04-01 15:29:29 +02:00
parent bbacfdc25b
commit e02c23b0f9
6 changed files with 6 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ func GoCPU(server, INFLUXDB_URL, INFLUXDB_ORG, INFLUXDB_BUCKET, INFLUXDB_TOKEN s
log.Println("Erreur de communication : " + reqUrl)
continue
}
resp.Body.Close()
defer resp.Body.Close()
var cpu cpu.CPUInfo
if err := json.NewDecoder(resp.Body).Decode(&cpu); err != nil {

View File

@@ -30,7 +30,7 @@ func GoDisk(server, INFLUXDB_URL, INFLUXDB_ORG, INFLUXDB_BUCKET, INFLUXDB_TOKEN
log.Println("Erreur de communication : " + reqUrl)
continue
}
resp.Body.Close()
defer resp.Body.Close()
var disks []disk.DiskFS
if err := json.NewDecoder(resp.Body).Decode(&disks); err != nil {

View File

@@ -30,7 +30,7 @@ func GoLoad(server, INFLUXDB_URL, INFLUXDB_ORG, INFLUXDB_BUCKET, INFLUXDB_TOKEN
log.Println("Erreur de communication : " + reqUrl)
continue
}
resp.Body.Close()
defer resp.Body.Close()
var avg load.LoadInfo
if err := json.NewDecoder(resp.Body).Decode(&avg); err != nil {

View File

@@ -30,7 +30,7 @@ func GoMem(server, INFLUXDB_URL, INFLUXDB_ORG, INFLUXDB_BUCKET, INFLUXDB_TOKEN s
log.Println("Erreur de communication : " + reqUrl)
continue
}
resp.Body.Close()
defer resp.Body.Close()
var mem memory.MemInfo
if err := json.NewDecoder(resp.Body).Decode(&mem); err != nil {

View File

@@ -31,7 +31,7 @@ func GoNet(server, INFLUXDB_URL, INFLUXDB_ORG, INFLUXDB_BUCKET, INFLUXDB_TOKEN s
log.Println("Erreur de communication : " + reqUrl)
continue
}
resp.Body.Close()
defer resp.Body.Close()
var nets []netcard.NetCard
if err := json.NewDecoder(resp.Body).Decode(&nets); err != nil {

View File

@@ -31,7 +31,7 @@ func GoProc(server, INFLUXDB_URL, INFLUXDB_ORG, INFLUXDB_BUCKET, INFLUXDB_TOKEN
log.Println("Erreur de communication : " + reqUrl)
continue
}
resp.Body.Close()
defer resp.Body.Close()
var procs []proc.Proc
if err := json.NewDecoder(resp.Body).Decode(&procs); err != nil {